package com.mobibom.pipelines;

import pipelines.free.beta.R;

import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.graphics.Typeface;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.KeyEvent;
import android.view.View;
import android.widget.Button;


public class StartScreenActivity extends Activity implements Runnable {
	Button playButton, howtoplayButton, settingsButton, rateButton;
	DatabaseHelper db;
	 private ProgressDialog pd;
	 SharedPreferences settings;
	@Override
	public void onCreate(Bundle savedInstanceState) {
	    super.onCreate(savedInstanceState);
	    setContentView(R.layout.startscreenview);
	    setViews();
	    db = new DatabaseHelper(this);
		   
	    settings = getSharedPreferences("levelsInDB", Context.MODE_PRIVATE);
	    
	    boolean vibrate = settings.getBoolean("vibrate", true);
	    boolean grid = settings.getBoolean("grid", true);
	    
	    
	    pd = ProgressDialog.show(this, getResources().getString(R.string.loadingPopUpTitle), getResources().getString(R.string.loadingPopUpText), true, false);

		Thread thread = new Thread(this);
		thread.start();
	}
	
	 public void run() {
		 boolean haveWeShownPreferences = settings.getBoolean("LevelsInDatabase", false);
		 boolean haveWeShownPreferencesLevelPack2 = settings.getBoolean("LevelsInDatabaseLevelPack2", false);
		 boolean haveWeShownPreferencesLevelPack3 = settings.getBoolean("LevelsInDatabaseLevelPack3", false);
		 boolean haveWeShownPreferencesExtraLevels = settings.getBoolean("extraLevels", false);
		 if (!haveWeShownPreferences) {
		    	addLevelsPack1Part1();
		    	addLevelsPack1Part2();
		    	
		    	setSettingsLevelPack1();
		    } else {
		       // we have already shown the preferences activity before
		    }
		    if (!haveWeShownPreferencesLevelPack2) {
		    	addLevelsPack2Part1();
		    	addLevelsPack2Part2(); 
		    	
		    	setSettingsLevelPack2();
		    }
		    if(!haveWeShownPreferencesLevelPack3) {
		    	addLevelsPack3Part1();
		    	addLevelsPack3Part2(); 
		    	
		    	setSettingsLevelPack3();
		    }
		    if(!haveWeShownPreferencesExtraLevels){
		    	addExtraLevelsLevelPack1();
		    	addExtraLevelsLevelPack2();
		    	addExtraLevelsLevelPack3();
		    	setSettingsLevelExtraLevels();
		    }
	 
	 
         handler.sendEmptyMessage(0);
	 }

	 private Handler handler = new Handler() {
	         @Override
	         public void handleMessage(Message msg) {
	        	 pd.dismiss();
	     	     addOnClickListeners();
	
	         }
	 };
	
	
	private void playPipelines(){
		//open levelpackactivity
		db.close();
		Intent level = new Intent(getApplicationContext(), LevelPackActivity.class);
		startActivity(level);
	}
	private void openHowToPlay(){
		//open howtoplayactivity
		db.close();
		Intent level = new Intent(getApplicationContext(), HowToPlayActivity.class);
		startActivity(level);
		this.finish();
	}
	private void openSettings(){
		db.close();
		Intent level = new Intent(getApplicationContext(), SettingsActivity.class);
		startActivity(level);
		this.finish();
	}
	
	private void setViews(){
		playButton = 		(Button)findViewById(R.id.buttonPlay);
		howtoplayButton = 	(Button)findViewById(R.id.buttonHowToPlay);
		settingsButton =	(Button)findViewById(R.id.buttonSettings);
		rateButton =		(Button)findViewById(R.id.buttonRate);
		
		
		Typeface buttonFace = Typeface.createFromAsset(getAssets(), "fonts/stencil.ttf");
		playButton.setTypeface(buttonFace);
		howtoplayButton.setTypeface(buttonFace);
		settingsButton.setTypeface(buttonFace);
		
	}
	private void addOnClickListeners() {
		 playButton.setOnClickListener
    	(
    		new View.OnClickListener()
	    	{
				@Override public void onClick(View v) {playPipelines();}
			}
    	);
		 howtoplayButton.setOnClickListener
    	(
    		new View.OnClickListener()
	    	{
				@Override public void onClick(View v) {openHowToPlay();}
			}
    	);
		 settingsButton.setOnClickListener
		    (
	    		new View.OnClickListener()
		    	{
					@Override public void onClick(View v) {openSettings();}
				}
	    	);
		 rateButton.setOnClickListener
		    (
		    		new View.OnClickListener()
			    	{
						@Override public void onClick(View v) {openRating();}
					}
		    	);
	}
	
	private void openRating() {
		  Intent intent = new Intent(Intent.ACTION_VIEW);
		  intent.setData(Uri.parse("market://details?id=pipelines.free.beta"));
		  startActivity(intent);
		}
	
	
	 @Override
	    public boolean onKeyDown(int keyCode, KeyEvent event) {
	        if ((keyCode == KeyEvent.KEYCODE_BACK)) {
	    		this.finish();
	        }
	        return super.onKeyDown(keyCode, event);
	    }
	//GROEN
	//0 = niks // 1 = hoek // 2 = tstuk // 3 = begin //4 = eind//5 = streep//6=kruis
	//BLAUW
	//7=beginblauw//8=eindblauw//9=hoekblauw//10=streepblauw//11=tstukblauw//12=kruisblauw
	//COMBI
	//13=kruiscombi // 14=hoekjecombi
	 //DECORATIE
    //15=decoratie1 //16=decoratie2
	private void addLevelsPack1Part1() {
		//add levelpacks
		db.addLevelPack("Western", "westernbutton");
		db.addLevelPack("Wereld 2", "plaatje");
		
		  db.addLevel(1,"1x1","plaatje",//levelpack,level,plaatje
		          //de buizen
				  0,1,5,2,5,1,0,0,
		          0,5,0,5,0,5,0,0,
		          0,5,0,3,0,5,0,0,
		          0,5,0,0,0,5,0,0,
		          0,1,5,2,5,1,0,0,
		          0,0,0,4,0,0,0,0,

		          0,0,0,0,0,0,0,0,
		          0,0,0,15,0,0,0,0,
		          0,0,15,16,15,0,0,0,
		          0,0,0,15,0,0,0,0,
		          //rotate van buizen: 0, 90, 180, 270
		          90,180,270,90,0,90,90,90,
		    0,270,90,0,180,270,270,90,270,
		    270,180,180,0,90,270,90,90,180,
		    90,270,90,90,90,180,0,0,180,
		    0,0,90,270,90,180,90,0,0,
		    0,180,270,180,180,90,90,270,270,
		    270,90,0,180,0,270,180,180,90,
		    180,270,90,0,270,0,0,180,90,
		    270,180,180,90,0,180,90,180,90
		    );
		  db.addLevel(1,"1x2","plaatje",//levelpack,level,plaatje
		          //de buizen
				  0,0,0,0,0,0,0,0,
		          0,3,5,1,15,0,16,0,
		          0,0,0,4,0,0,0,0,
		          0,0,0,0,0,4,0,0,
		          0,0,0,0,0,5,15,0,
		          0,1,5,3,0,5,0,0,
		          16,5,0,0,0,5,0,0,
		          0,5,3,5,5,1,0,0,
		          0,1,5,5,5,5,5,1,
		          0,0,0,0,0,0,0,4,

		          //rotate van buizen: 0, 90, 180, 270
		          0,270,0,90,270,0,0,90,
		    0,180,90,0,90,0,180,0,270,
		    0,0,180,180,180,0,0,0,0,
		    90,0,180,180,0,90,180,90,90,
		    0,90,0,0,270,90,180,0,270,
		    270,270,180,180,90,90,0,270,0,
		    180,90,90,180,90,0,180,180,0,
		    0,0,180,180,270,270,180,180,270,
		    180,180,270,90,0,270,0,270,270
		    );
		  db.addLevel(1,"1x3","plaatje",//levelpack,level,plaatje
		          //de buizen
				  0,0,0,0,0,0,16,0,
		          0,0,0,4,5,5,5,1,
		          0,15,0,0,0,0,0,5,
		          0,0,0,1,5,1,0,5,
		          16,0,0,5,0,5,1,1,
		          0,0,0,5,16,1,1,0,
		          0,0,0,5,0,1,1,0,
		          0,0,0,5,0,3,5,16,
		          0,16,0,1,5,5,1,0,

		          0,0,0,0,0,0,0,0,
		          //rotate van buizen: 0, 90, 180, 270
		          180,270,180,90,0,180,270,180,
				    0,0,180,180,90,90,90,0,90,
				    90,90,90,180,90,270,0,270,0,
				    90,180,0,180,180,270,270,90,90,
				    180,270,90,0,180,180,180,180,270,
				    180,0,90,0,270,0,0,0,270,
				    0,90,90,270,180,270,270,90,90,
				    270,90,270,270,0,0,90,180,180,
				    270,90,270,180,0,180,180,180,180
				    
				    );
		 
		  db.addLevel(1,"1x4","plaatje",//levelpack,level,plaatje
		          //de buizen
				  0,0,0,1,5,1,0,0,
		          1,5,3,5,0,5,16,0,
		          1,1,1,1,0,5,0,0,
		          0,1,1,0,0,5,0,0,
		          15,0,0,0,0,5,0,0,
		          0,15,1,5,5,2,1,0,
		          0,0,5,0,1,5,1,16,
		          0,0,5,1,2,4,0,0,
		          0,0,1,1,0,0,15,0,

		          0,0,0,0,0,0,0,0,
		          //rotate van buizen: 0, 90, 180, 270
		          0,270,270,90,180,0,180,90,
		    0,90,0,0,0,0,270,0,0,
		    90,90,90,180,180,270,0,0,0,
		    90,180,270,0,90,270,0,180,180,
		    180,0,270,0,270,0,180,180,180,
		    180,90,270,90,90,270,90,0,0,
		    270,180,90,0,270,90,0,90,90,
		    0,270,180,270,0,270,270,90,0,
		    180,90,270,90,0,90,90,180,180
		    );
		  
		  db.addLevel(1,"1x5","plaatje",//levelpack,level,plaatje
		          //de buizen
				  0,0,0,0,7,0,0,0,
		          0,15,0,0,10,0,16,0,
		          0,0,0,0,10,0,8,0,
		          0,0,0,0,10,0,10,0,
		          0,9,10,10,9,0,10,0,
		          0,10,0,9,10,10,9,0,
		          0,10,0,10,0,0,0,0,
		          0,8,0,10,0,0,0,0,
		          0,16,0,10,0,0,15,0,
		          0,0,0,7,0,0,0,0,

		          //rotate van buizen: 0, 90, 180, 270
		          270,270,270,180,180,270,270,180,
		    0,0,90,270,90,90,0,180,0,
		    270,270,180,90,180,270,270,90,0,
		    0,90,0,180,90,270,270,90,90,
		    270,90,270,0,90,270,0,0,0,
		    180,270,90,0,0,270,180,180,90,
		    180,270,180,180,0,90,180,180,0,
		    90,90,180,0,270,270,270,90,180,
		    0,90,180,270,270,0,0,180,180
		    );
		  db.addLevel(1,"1x6","plaatje",//levelpack,level,plaatje
		          //de buizen
				  16,0,0,0,0,0,0,16,
		          0,3,5,1,1,5,3,0,
		          15,0,0,1,2,0,0,16,
		          0,15,0,0,5,0,16,0,
		          0,0,15,1,1,16,0,0,
		          4,5,5,6,5,5,5,4,
		          0,0,0,5,0,0,0,0,
		          0,0,0,5,0,0,0,0,
		          0,0,4,2,4,0,0,0,
		          15,0,0,0,0,0,0,15,
		          //rotate van buizen: 0, 90, 180, 270
		          180,0,0,180,0,0,180,90,
		    90,270,270,270,270,90,180,180,90,
		    270,180,180,270,0,90,180,180,180,
		    90,180,0,180,90,270,0,270,270,
		    180,0,180,0,180,180,180,180,90,
		    180,0,0,90,90,180,270,270,0,
		    180,90,0,180,0,0,90,0,270,
		    90,0,270,270,180,90,90,90,0,
		    0,180,270,180,180,0,180,180,0
		    );
		  db.addLevel(1,"1x7","plaatje",//levelpack,level,plaatje
		          //de buizen
				  1,5,4,7,3,0,0,0,
		          5,0,0,9,13,9,15,0,
		          2,5,5,1,1,14,9,0,
		          5,0,4,2,5,1,10,0,
		          5,0,8,11,10,10,11,0,
		          5,0,0,10,0,0,8,0,
		          1,4,0,10,0,0,16,0,
		          0,0,0,8,0,0,0,0,
		          0,15,0,0,16,0,0,0,
		          0,0,0,0,0,0,15,0,

		          //rotate van buizen: 0, 90, 180, 270

				180,0,180,270,90,180,90,180,180,
				0,180,0,270,270,0,0,270,90,
				0,270,0,90,270,0,90,180,180,
				270,0,270,0,270,180,180,0,180,
				0,270,180,180,270,0,90,0,90,
				0,0,270,90,180,270,0,180,180,
				90,180,90,90,180,90,90,270,0,
				0,0,270,0,90,90,270,0,180,
				180,270,90,0,90,90,0,180
		    
		    );
		  db.addLevel(1,"1x8","plaatje",//levelpack,level,plaatje
		          //de buizen
				  4,15,0,0,0,0,0,4,
		          5,0,0,0,0,1,5,2,
		          5,0,0,0,1,1,0,5,
		          5,0,0,1,1,0,1,1,
		          5,0,0,5,0,1,1,0,
		          5,15,1,1,1,1,0,0,
		          5,1,1,1,1,0,0,0,
		          5,5,1,1,0,0,0,0,
		          1,6,1,16,0,0,0,16,
		          3,2,5,5,5,5,5,4,

		          //rotate van buizen: 0, 90, 180, 270
		    0,0,90,0,90,90,90,270,
		    180,270,270,270,180,180,90,270,180,
		    90,180,270,180,90,90,270,90,180,
		    0,270,0,270,0,90,90,90,0,
		    180,180,270,180,90,270,180,270,180,
		    180,180,180,90,270,270,270,180,270,
		    90,90,270,0,90,180,90,0,0,
		    90,270,0,270,180,180,90,90,270,
		    90,0,270,180,0,180,0,270,270
		    );
		  db.addLevel(1,"1x9","plaatje",//levelpack,level,plaatje
		          //de buizen
				  15,16,0,0,1,5,5,3,
		          16,0,0,0,5,3,5,1,
		          0,1,5,4,5,0,0,5,
		          0,5,0,0,5,0,0,5,
		          0,1,5,5,1,0,0,5,
		          0,0,0,0,0,0,0,5,
		          0,0,1,5,5,5,5,1,
		          0,0,5,0,0,0,0,15,
		          0,0,4,0,0,0,15,16,

		          0,0,0,0,0,0,0,0,
		          //rotate van buizen: 0, 90, 180, 270
		          270,0,90,0,180,180,90,90,
		    0,0,180,90,270,0,180,270,270,
		    0,180,0,0,0,90,180,180,90,
		    180,270,270,270,180,0,0,180,270,
		    270,90,180,90,0,0,0,180,90,
		    90,0,180,270,90,180,180,90,0,
		    270,0,0,0,0,180,270,0,90,
		    180,90,90,180,90,270,270,90,0,
		    180,90,0,90,90,180,90,270,90
		    );
		  db.addLevel(1,"1x10","plaatje",//levelpack,level,plaatje
		          //de buizen
				  1,3,4,0,7,0,0,0,
		          2,5,2,0,10,0,15,0,
		          2,1,5,9,9,0,0,0,
		          2,1,5,10,0,0,0,0,
		          1,5,14,9,0,0,16,0,
		          0,0,10,0,0,0,0,0,
		          0,0,9,10,10,8,0,0,
		          0,0,0,0,0,0,0,0,
		          0,0,16,0,0,0,16,0,
		          0,0,0,0,0,0,0,0,

		          //rotate van buizen: 0, 90, 180, 270

				0,180,0,0,0,0,270,180,180,
				90,180,90,90,180,90,90,270,270,
				180,180,0,180,0,270,0,0,180,
				180,270,0,270,0,180,90,270,270,
				90,180,90,180,90,180,0,90,180,
				0,90,0,0,180,180,270,0,0,
				180,90,180,0,90,270,180,180,270,
				0,180,270,270,90,0,0,270,90,
				180,180,90,0,0,180,90,180
		    
		    );
		  db.addLevel(1,"1x11","plaatje",//levelpack,level,plaatje
		          //de buizen
				  0,0,3,3,0,7,0,0,
		          0,0,5,5,0,10,15,0,
		          0,7,5,1,5,14,9,0,
		          0,10,5,0,1,1,10,0,
		          0,9,13,10,13,8,10,0,
		          0,16,5,15,1,5,14,8,
		          0,0,4,0,0,0,5,0,
		          0,0,0,0,0,4,1,0,
		          16,0,0,0,16,0,15,0,
		          0,0,0,16,0,0,0,0,

		          //rotate van buizen: 0, 90, 180, 270
				
				180,270,90,0,0,270,270,270,270,
				180,180,270,180,90,180,90,270,180,
				90,0,0,0,0,0,270,180,90,
				180,0,270,0,0,270,90,0,270,
				90,270,90,270,180,90,180,270,180,
				180,180,0,270,270,180,90,270,90,
				270,180,0,90,180,270,180,270,90,
				0,180,90,90,180,270,0,90,180,
				180,0,0,270,0,180,90,180
		    
		    );
		  db.addLevel(1,"1x12","plaatje",//levelpack,level,plaatje
		          //de buizen
				  16,16,16,16,16,16,16,16,
		          0,0,7,3,5,5,1,0,
		          8,10,12,10,10,10,14,1,
		          0,0,10,0,0,0,10,5,
		          3,5,13,5,5,4,10,5,
		          0,0,10,0,0,9,9,4,
		          0,0,8,0,0,10,0,0,
		          0,0,0,0,0,10,0,0,
		          0,0,0,0,0,7,0,0,
		          15,15,15,15,15,15,15,15,

		          //rotate van buizen: 0, 90, 180, 270
				
				90,0,180,90,0,270,180,270,180,
				270,180,180,270,0,270,270,180,180,
				270,0,0,180,0,270,270,90,90,
				270,0,0,180,0,270,270,270,90,
				180,0,90,0,180,270,270,270,270,
				180,90,270,270,0,0,180,90,0,
				0,180,90,0,270,90,0,90,0,
				180,270,0,90,90,90,90,180,90,
				270,180,90,270,180,270,0,180
		    
		    );
		  db.addLevel(1,"1x13","plaatje",//levelpack,level,plaatje
		          //de buizen
				  1,5,5,5,1,0,0,0,
				  5,0,0,1,1,0,15,0,
				  5,0,0,5,0,0,0,0,
				  5,3,5,1,0,16,0,0,
				  5,0,0,0,0,0,0,0,
				  1,1,15,0,1,5,5,4,
				  0,5,0,0,5,0,16,0,
				  0,1,5,5,2,0,0,0,
				  0,0,0,0,1,5,5,4,
				  0,15,0,0,0,16,0,0,

		          //rotate van buizen: 0, 90, 180, 270
				180,90,180,270,270,270,0,270,90,
				180,90,0,270,0,270,0,270,0,
				270,270,270,0,90,180,0,270,180,
				90,90,180,0,270,270,0,180,180,
				0,0,180,0,180,90,90,180,0,
				270,0,90,180,180,270,180,270,0,
				0,0,0,0,180,270,270,270,0,
				90,270,90,180,270,180,270,90,180,
				0,90,90,90,0,270,0,270
		    ); 
		  db.addLevel(1,"1x14","plaatje",//levelpack,level,plaatje
		          //de buizen
				  1,5,5,2,5,2,5,1,
		          5,4,0,5,0,5,0,4,
		          1,2,0,5,0,5,0,0,
		          0,5,0,5,0,2,4,0,
		          15,5,0,3,0,5,0,16,
		          16,1,1,0,4,5,0,15,
		          15,0,1,5,6,1,0,16,
		          4,0,0,0,5,0,0,0,
		          2,5,5,5,2,5,5,4,
		          4,0,0,0,0,0,0,0,
		          //rotate van buizen: 0, 90, 180, 270
		          90,90,90,180,180,270,0,270,
				    270,270,180,180,180,180,180,0,270,
				    180,90,90,270,270,0,180,180,270,
				    180,270,270,270,180,180,180,180,0,
				    0,0,180,180,270,90,270,0,270,
				    0,180,270,0,180,180,0,90,270,
				    90,90,180,0,90,90,0,0,180,
				    270,0,90,180,0,0,90,270,90,
				    0,270,0,0,90,90,180,180,180
				    );
		  

		
		  db.addLevel(1,"1x15","plaatje",//levelpack,level,plaatje
		          //de buizen
				  4,1,5,5,3,16,0,4,
		          5,1,5,1,1,5,1,5,
		          5,0,0,5,5,0,5,5,
		          5,0,0,5,1,1,5,5,
		          3,0,0,5,3,1,5,3,
		          0,15,0,5,1,5,1,0,
		          0,0,1,1,1,5,1,0,
		          0,0,5,0,0,1,1,0,
		          1,5,1,0,0,5,16,0,
		          4,0,16,0,0,1,5,4,

		          //rotate van buizen: 0, 90, 180, 270
		          90,90,0,0,90,90,90,270,
		    270,270,90,0,90,270,180,180,270,
		    90,270,0,90,180,0,0,90,180,
		    90,90,0,180,180,270,0,0,0,
		    0,270,90,270,270,0,270,90,270,
		    270,0,90,270,270,180,0,90,180,
		    270,180,270,270,180,0,90,270,180,
		    90,180,270,180,270,270,0,0,270,
		    270,90,0,270,270,0,180,0,90
		    );

		  db.addLevel(1,"1x16","plaatje",//levelpack,level,plaatje
		          //de buizen
				  4,3,0,0,4,5,1,0,
		          1,6,5,5,1,0,5,0,
		          0,5,0,0,4,0,5,0,
		          4,2,5,5,5,5,6,4,
		          15,0,0,0,4,0,5,0,
		          0,15,4,0,2,5,6,4,
		          15,0,2,5,1,0,1,4,
		          0,15,1,5,5,5,1,0,
		          16,16,16,4,0,0,5,0,
		          0,0,4,2,5,5,1,0,

		          //rotate van buizen: 0, 90, 180, 270
		          90,0,90,270,90,90,270,0,
		    0,180,180,270,0,0,270,90,90,
		    270,180,0,0,90,90,270,270,270,
		    90,90,0,270,0,90,90,270,180,
		    0,90,270,270,270,90,180,90,90,
		    0,90,0,90,90,0,0,90,90,
		    0,180,90,270,0,0,270,180,180,
		    270,0,180,0,180,0,0,90,180,
		    90,90,270,270,270,270,270,180,90
		    );

		  db.addLevel(1,"1x17","plaatje",//levelpack,level,plaatje
		          //de buizen
				  4,4,4,4,4,4,4,4,
		          5,5,5,5,5,5,5,5,
		          5,5,5,5,5,5,5,5,
		          1,2,2,6,2,2,2,1,
		          16,16,16,5,15,15,15,15,
		          16,16,1,2,1,15,15,15,
		          16,1,1,0,1,1,15,15,
		          1,2,0,0,0,1,2,1,
		          5,2,2,1,1,2,2,5,
		          3,3,3,3,3,3,3,3,
		          //rotate van buizen: 0, 90, 180, 270
		          90,270,90,90,90,0,270,180,
		    180,180,270,0,90,0,90,270,180,
		    180,90,90,0,270,90,270,270,90,
		    180,90,180,0,90,90,90,0,180,
		    180,90,0,180,270,180,270,0,0,
		    0,90,270,90,270,90,270,180,180,
		    180,270,270,90,0,90,0,90,90,
		    90,0,90,180,270,180,90,90,180,
		    270,270,90,180,270,90,270,180,90
		    );
		  db.addLevel(1,"1x18","plaatje",//levelpack,level,plaatje
		          //de buizen
				  15,0,0,0,0,3,0,16,
		          0,3,1,0,0,5,0,0,
		          9,7,5,15,16,1,5,1,
		          9,10,13,9,0,0,0,5,
		          9,10,13,9,0,7,9,5,
		          10,0,1,5,5,4,10,5,
		          8,0,1,5,5,5,13,1,
		          0,0,1,4,15,16,10,0,
		          0,0,0,0,0,0,8,0,
		          16,0,0,0,0,0,0,15,

		          //rotate van buizen: 0, 90, 180, 270

				90,0,180,180,0,90,270,0,180,
				270,0,270,90,270,270,0,0,180,
				0,90,90,180,180,90,270,180,90,
				90,0,0,270,270,180,90,90,0,
				0,0,90,270,0,90,270,180,0,
				180,270,180,270,180,0,90,0,90,
				0,180,0,0,0,90,180,270,270,
				180,0,0,90,90,90,270,0,180,
				270,180,0,0,90,90,0,270
		    
		    );
		
		  db.addLevel(1,"1x19","plaatje",//levelpack,level,plaatje
		          //de buizen
				  0,0,0,7,7,7,0,0,
		          15,0,0,10,10,10,0,15,
		          0,0,9,9,10,9,9,0,
		          0,8,11,8,11,8,11,8,
		          0,0,11,8,0,8,11,0,
		          4,5,14,8,0,4,14,8,
		          0,4,2,4,2,4,2,4,
		          0,0,1,1,5,1,1,0,
		          0,0,16,5,5,5,16,0,
		          0,0,0,3,3,3,0,0,

		          //rotate van buizen: 0, 90, 180, 270

				90,0,270,90,0,90,90,0,0,
				180,0,270,270,90,270,0,0,270,
				90,90,0,0,90,270,180,180,0,
				90,90,90,0,90,180,180,90,270,
				90,180,90,270,270,180,180,180,270,
				180,90,180,270,90,270,0,270,90,
				180,0,270,180,270,90,270,180,270,
				0,0,0,0,0,270,270,270,90,
				270,90,90,0,0,270,90,270
		    
		    );
		  db.addLevel(1,"1x20","plaatje",//levelpack,level,plaatje
		          //de buizen
				  0,1,1,0,0,0,15,0,
		          0,5,1,1,0,0,0,15,
		          3,1,0,1,2,4,0,0,
		          0,0,4,8,13,10,9,0,
		          0,16,1,1,5,0,10,0,
		          0,0,0,1,2,4,9,9,
		          7,10,10,9,0,15,9,9,
		          0,16,0,11,10,10,11,7,
		          0,0,0,10,0,0,0,0,
		          0,8,10,11,10,10,8,0,

		          //rotate van buizen: 0, 90, 180, 270
				
				270,180,90,180,270,270,0,270,180,
				270,270,180,0,90,90,0,270,90,
				270,0,90,0,180,270,90,180,270,
				180,0,180,0,90,180,270,270,0,
				90,270,0,270,180,90,90,90,180,
				90,0,270,0,90,90,0,180,0,
				180,0,0,90,90,270,90,180,270,
				90,180,270,90,180,0,270,90,180,
				0,270,0,0,90,90,270,0
		    
		    );
	}
	private void addLevelsPack1Part2(){
		  db.addLevel(1,"1x21","plaatje",//levelpack,level,plaatje
		          //de buizen
				  1,2,3,1,5,2,5,4,
		          4,5,1,2,15,5,0,3,
		          16,1,6,1,15,5,1,1,
		          0,1,1,0,1,6,6,4,
		          0,5,4,5,2,1,4,0,
		          1,1,3,5,2,5,5,4,
		          1,5,5,1,5,0,0,16,
		          0,0,0,4,1,5,4,0,
		          3,5,2,5,5,5,4,0,
		          15,15,4,15,15,15,15,15,

		          //rotate van buizen: 0, 90, 180, 270
				
				0,90,90,0,270,0,90,90,90,
				180,90,270,0,270,180,90,180,90,
				180,90,180,90,90,90,180,270,0,
				180,90,0,270,270,0,180,90,90,
				180,0,0,180,180,0,180,0,270,
				270,0,180,90,180,270,0,0,90,
				0,90,180,180,180,180,180,0,90,
				90,90,180,270,90,270,0,90,0,
				90,270,0,180,270,270,270,180
		    );
		  db.addLevel(1,"1x22","plaatje",//levelpack,level,plaatje
		          //de buizen
				  1,5,5,1,9,10,9,8,
				  5,0,15,5,9,9,9,9,
				  5,1,5,1,0,10,0,0,
				  5,5,0,9,10,9,0,16,
				  5,2,5,14,10,10,7,0,
				  5,5,15,5,1,1,1,1,
				  5,5,0,3,5,5,5,5,
				  1,6,5,5,1,1,2,2,
				  4,1,1,0,16,0,4,1,
				  1,5,1,0,0,0,15,0,

		          //rotate van buizen: 0, 90, 180, 270
				  90,90,0,0,270,270,90,180,270,
				  270,180,90,270,0,90,0,270,180,
				  180,0,90,270,0,90,0,270,180,
				  0,180,180,270,0,270,270,270,270,
				  180,90,180,90,180,270,0,180,0,
				  180,270,180,180,0,180,180,0,90,
				  180,180,180,0,180,270,270,90,180,
				  90,180,180,180,0,90,0,180,90,
				  0,90,90,0,90,180,0,90
		    ); 
		  db.addLevel(1,"1x23","plaatje",//levelpack,level,plaatje
		          //de buizen
				  3,1,15,0,9,10,9,16,
				  0,1,5,5,13,1,10,4,
				  7,9,9,10,9,1,13,2,
				  0,9,9,1,1,9,9,4,
				  3,5,5,1,5,9,9,4,
				  0,9,10,9,1,5,13,1,
				  7,9,0,9,9,0,9,8,
				  8,9,15,9,9,1,1,16,
				  3,13,5,13,5,1,1,1,
				  0,9,10,9,0,15,0,4,

		          //rotate van buizen: 0, 90, 180, 270
				  270,180,0,0,0,0,0,90,0,
				  180,0,0,270,270,90,0,180,0,
				  270,270,180,180,0,0,0,270,180,
				  90,90,270,270,0,90,90,0,0,
				  180,90,90,270,0,180,180,0,90,
				  0,90,0,90,0,90,180,0,90,
				  270,90,90,270,90,270,180,0,90,
				  180,0,90,0,180,0,90,180,270,
				  0,270,270,90,180,90,90,90
		    ); 
		  db.addLevel(1,"1x24","plaatje",//levelpack,level,plaatje
		          //de buizen
				  4,5,5,5,5,5,5,1,
				  1,5,5,5,5,5,1,5,
				  5,1,5,5,5,1,5,5,
				  5,5,1,5,1,5,5,5,
				  5,5,5,3,1,5,5,5,
				  5,5,1,5,5,1,5,5,
				  5,1,5,5,5,5,1,5,
				  1,5,5,5,5,5,5,1,
				  15,0,16,0,15,0,16,0,
				  0,15,0,16,0,15,0,16,

		          //rotate van buizen: 0, 90, 180, 270
				  180,0,270,90,90,270,270,0,270,
				  0,0,270,90,0,0,270,270,0,
				  90,90,0,0,0,180,0,270,180,
				  0,0,270,90,270,0,0,90,90,
				  0,0,180,0,90,90,180,0,270,
				  90,180,90,270,270,0,0,90,90,
				  0,270,180,0,90,270,0,0,270,
				  270,180,270,90,90,0,0,180,180,
				  90,180,270,90,270,90,90,270
		    ); 
		  db.addLevel(1,"1x25","plaatje",//levelpack,level,plaatje
		          //de buizen
				  0,0,0,0,7,0,15,0,
		          0,3,0,0,10,9,10,9,
		          0,1,2,2,13,14,9,10,
		          15,0,4,4,9,13,9,10,
		          0,16,0,8,15,2,4,10,
		          0,8,9,11,10,13,9,10,
		          0,11,9,0,1,1,9,9,
		          0,10,16,1,1,4,0,0,
		          0,10,16,1,5,1,0,0,
		          0,8,0,0,0,0,16,0,

		          //rotate van buizen: 0, 90, 180, 270
				
				0,0,0,90,180,270,270,90,180,
				270,270,90,270,0,90,180,180,270,
				0,270,270,90,270,90,270,270,180,
				180,90,90,270,0,0,180,180,0,
				90,0,270,180,270,270,180,90,90,
				90,0,180,90,0,270,0,90,180,
				0,270,270,180,90,0,270,180,270,
				90,90,270,180,270,180,90,180,180,
				180,180,180,90,90,90,90,90
		    
		    );
		  
		  
		  
		  db.addLevel(1,"1x26","plaatje",//levelpack,level,plaatje
		          //de buizen
				  1,5,3,1,1,9,10,7,
				  5,3,5,1,1,13,1,7,
				  1,1,9,10,10,9,5,10,
				  8,5,10,1,1,9,13,9,
				  9,13,9,5,5,10,1,4,
				  7,1,5,1,1,13,5,1,
				  9,10,9,3,1,10,4,1,
				  9,8,10,1,1,8,7,9,
				  9,10,9,1,1,9,10,9,
				  4,5,5,5,1,9,10,8,

		          //rotate van buizen: 0, 90, 180, 270
				  270,180,270,180,90,0,180,90,0,
				  0,0,270,180,90,270,180,0,270,
				  0,270,180,0,90,0,180,270,180,
				  0,180,0,90,0,90,270,0,180,
				  0,270,0,0,270,270,180,0,0,
				  0,0,0,90,0,180,0,0,270,
				  270,90,0,180,0,270,270,180,180,
				  0,0,0,270,180,90,90,270,270,
				  0,90,90,0,0,180,90,90
		    ); 
		  db.addLevel(1,"1x27","plaatje",//levelpack,level,plaatje
		          //de buizen
				  1,5,1,9,9,0,9,8,
				  5,0,3,10,7,15,9,9,
				  1,5,5,13,5,5,1,10,
				  0,16,0,10,3,1,4,10,
				  1,5,5,13,5,1,9,9,
				  1,5,1,10,7,10,11,0,
				  15,8,4,10,8,9,10,16,
				  1,14,7,10,3,9,9,0,
				  5,1,5,13,1,9,10,9,
				  1,5,4,9,10,9,8,9,

		          //rotate van buizen: 0, 90, 180, 270
				  270,90,270,180,90,180,180,270,0,
				  270,0,90,270,180,270,180,270,180,
				  90,0,270,90,270,180,180,0,90,
				  270,90,270,270,0,270,270,90,90,
				  270,180,0,90,180,0,90,90,0,
				  90,0,270,180,0,270,90,0,90,
				  180,180,180,0,0,90,0,180,90,
				  270,90,90,0,0,180,90,0,270,
				  90,0,90,90,180,90,180,0
		    ); 
		  db.addLevel(1,"1x28","plaatje",//levelpack,level,plaatje
		          //de buizen
				  1,5,1,1,5,5,5,1,
				  4,3,5,5,1,5,3,5,
				  8,1,1,5,1,5,5,1,
				  10,9,10,13,10,9,15,8,
				  9,9,16,4,15,9,9,10,
				  1,5,5,1,3,1,10,10,
				  1,5,4,5,8,5,10,10,
				  9,10,9,1,13,1,9,11,
				  10,7,9,16,10,9,7,10,
				  9,10,10,10,9,9,10,9,

		          //rotate van buizen: 0, 90, 180, 270
				  270,0,270,180,0,270,270,180,90,
				  0,270,180,270,90,0,90,270,180,
				  90,180,270,0,180,90,180,90,0,
				  270,180,0,270,180,180,0,90,0,
				  270,0,90,0,90,180,90,180,180,
				  180,90,90,0,180,270,180,90,90,
				  90,0,0,270,270,0,0,90,0,
				  0,180,270,0,270,90,90,90,90,
				  270,270,0,90,270,270,270,90
		    ); 
		  db.addLevel(1,"1x29","plaatje",//levelpack,level,plaatje
		          //de buizen
				  1,1,3,4,3,1,1,4,
				  5,1,1,1,1,1,2,1,
				  1,1,15,7,1,5,5,1,
				  0,5,9,9,8,10,9,16,
				  9,13,9,9,9,9,9,0,
				  10,5,15,10,10,10,7,9,
				  9,13,10,9,10,10,9,9,
				  16,1,1,9,9,10,10,4,
				  9,10,13,9,1,13,13,1,
				  9,8,1,5,1,9,9,15,

		          //rotate van buizen: 0, 90, 180, 270
				  0,90,180,180,90,270,90,0,270,
				  180,90,0,180,270,270,90,180,270,
				  0,270,90,270,270,180,180,270,270,
				  180,180,90,270,180,90,180,0,270,
				  270,90,0,90,90,90,270,270,270,
				  90,0,0,180,0,270,270,180,90,
				  180,0,270,180,180,180,180,270,90,
				  0,270,180,0,90,180,270,0,90,
				  0,270,270,90,180,270,270,0
		    );
		  db.addLevel(1,"1x30","plaatje",//levelpack,level,plaatje
		          //de buizen
				  15,9,10,9,1,1,1,1,
				  9,9,16,10,5,1,6,1,
				  9,10,9,10,5,4,1,3,
				  9,8,10,9,13,10,9,5,
				  10,7,9,15,5,4,10,5,
				  10,3,5,5,1,5,10,5,
				  9,9,9,10,9,1,13,1,
				  8,9,9,16,9,10,9,15,
				  9,10,10,9,7,9,9,8,
				  0,16,0,9,11,9,9,9,

		          //rotate van buizen: 0, 90, 180, 270
				  90,180,90,90,0,90,90,270,0,
				  90,270,90,180,0,270,270,270,90,
				  270,0,90,0,90,90,270,270,90,
				  90,270,90,90,0,0,0,270,180,
				  0,90,0,270,90,90,90,270,180,
				  270,0,180,90,270,180,270,0,0,
				  0,270,180,270,0,90,180,0,270,
				  90,0,180,270,270,180,0,90,270,
				  270,0,90,90,270,270,270,0
		    );   
		  db.addLevel(1,"1x31","plaatje",//levelpack,level,plaatje
		          //de buizen
				  4,1,1,3,4,4,4,4,
		          5,4,2,6,2,5,5,5,
		          2,5,1,5,1,6,6,1,
		          1,5,4,5,4,6,6,4,
		          1,5,5,1,4,6,6,4,
		          1,2,2,4,4,1,1,4,
		          4,4,4,4,1,4,4,4,
		          1,5,5,2,6,5,2,1,
		          1,2,2,2,6,2,2,1,
		          4,4,4,4,3,4,4,4,

		          //rotate van buizen: 0, 90, 180, 270
		          270,90,0,90,90,90,90,180,
		    90,0,90,180,0,0,180,90,90,
		    90,0,0,270,0,90,0,90,270,
		    180,90,90,90,0,90,90,90,180,
		    0,180,270,270,90,180,270,0,270,
		    0,90,270,180,0,90,90,90,0,
		    0,270,90,90,90,180,270,0,90,
		    90,180,0,0,270,90,180,0,270,
		    90,0,90,0,270,180,180,0,90
		    
		    );
		  db.addLevel(1,"1x32","plaatje",//levelpack,level,plaatje
		          //de buizen
				  3,1,1,4,3,3,5,4,
		          1,2,1,16,5,16,3,4,
		          2,2,5,2,6,5,4,0,
		          5,5,0,4,5,0,0,0,
		          5,5,0,1,1,0,0,0,
		          1,2,4,6,5,5,1,0,
		          4,1,0,5,0,0,5,0,
		          0,0,0,1,5,3,5,0,
		          0,0,4,5,5,5,1,0,
		          15,0,0,0,0,0,0,15,

		          //rotate van buizen: 0, 90, 180, 270
		          180,90,270,270,90,180,180,180,
		    0,270,90,0,180,0,90,90,180,
		    0,270,180,0,90,270,270,90,180,
		    90,90,270,0,0,0,180,180,180,
		    0,270,90,180,0,270,0,90,0,
		    0,0,270,270,90,0,90,90,0,
		    180,180,90,270,270,180,90,90,180,
		    270,180,270,270,0,90,270,180,90,
		    180,270,0,0,0,90,0,90,270
		    
		    );
		  db.addLevel(1,"1x33","plaatje",//levelpack,level,plaatje
		          //de buizen
				  1,1,1,5,5,5,1,0,
		          5,3,1,5,1,0,5,0,
		          1,5,1,16,2,4,2,4,
		          4,1,5,0,5,0,5,0,
		          1,1,5,1,1,4,2,16,
		          1,1,1,1,4,0,5,0,
		          1,1,0,15,2,5,1,0,
		          5,0,15,0,1,5,2,4,
		          1,1,0,4,0,16,1,1,
		          0,1,5,2,5,5,5,1,

		          //rotate van buizen: 0, 90, 180, 270

				0,0,180,180,180,90,90,90,0,
				0,90,180,90,270,0,180,180,180,
				180,270,270,90,180,0,90,270,0,
				90,0,270,180,180,0,270,90,270,
				180,270,270,270,180,90,90,270,0,
				90,0,180,180,0,180,90,180,270,
				0,270,180,270,0,0,180,0,270,
				0,270,90,90,270,0,90,180,0,
				180,90,180,0,90,180,180,180
		    );
		  
		  db.addLevel(1,"1x34","plaatje",//levelpack,level,plaatje
		          //de buizen
				  0,3,0,1,5,2,4,0,
		          1,2,0,1,1,5,1,1,
		          5,4,1,1,5,1,1,5,
		          1,5,1,1,1,15,1,1,
		          0,4,0,4,0,0,1,1,
		          16,2,5,6,5,5,5,1,
		          0,5,0,1,5,1,0,0,
		          0,1,5,5,5,2,0,0,
		          0,0,0,16,0,4,0,16,
		          0,15,0,0,0,15,0,0,

		          //rotate van buizen: 0, 90, 180, 270

				270,180,0,0,270,180,180,270,0,
				180,180,90,180,270,270,90,270,180,
				90,0,90,0,270,0,180,270,90,
				270,180,90,90,270,90,180,0,180,
				0,90,0,180,270,270,180,270,270,
				180,0,180,270,180,180,270,90,270,
				180,0,0,0,180,270,90,0,270,
				180,90,90,180,270,270,270,90,270,
				0,0,0,90,90,0,180,270
		    );
		  
		  db.addLevel(1,"1x35","plaatje",//levelpack,level,plaatje
		          //de buizen
				  0,1,5,1,0,16,4,0,
		          15,3,0,5,4,4,2,4,
		          0,0,0,1,2,2,1,1,
		          3,5,5,5,1,5,4,2,
		          0,4,4,16,5,5,4,5,
		          0,2,2,0,4,5,2,1,
		          16,5,2,5,5,1,5,0,
		          0,5,4,0,0,0,5,0,
		          4,6,5,5,5,5,6,4,
		          0,4,0,0,15,0,4,0,

		          //rotate van buizen: 0, 90, 180, 270

				0,270,0,270,270,0,270,180,270,
				0,270,0,0,0,270,180,90,180,
				0,270,270,90,0,0,270,0,180,
				180,90,180,180,90,90,90,270,180,
				0,90,90,180,180,270,270,0,270,
				90,0,90,90,270,90,270,180,180,
				270,90,90,270,270,0,0,180,270,
				180,0,90,0,0,180,90,90,180,
				270,180,90,270,90,90,180,0
		    
		    );
		  
		  db.addLevel(1,"1x36","plaatje",//levelpack,level,plaatje
		          //de buizen
				  4,3,1,1,8,0,8,15,
		          5,1,2,5,10,0,9,9,
		          1,5,1,1,14,9,7,10,
		          7,10,10,11,13,11,11,9,
		          0,1,5,13,1,10,10,16,
		          4,1,15,11,10,9,11,8,
		          8,11,10,12,10,10,9,0,
		          8,11,0,8,0,8,16,0,
		          0,9,10,11,10,11,11,8,
		          0,0,0,8,15,0,8,16,

		          //rotate van buizen: 0, 90, 180, 270

				180,270,180,90,90,0,180,180,270,
				0,270,180,180,0,0,180,180,90,
				90,0,270,0,180,270,180,180,90,
				270,180,0,90,0,180,270,270,180,
				270,180,180,0,0,90,90,0,0,
				180,270,270,0,0,0,270,0,180,
				270,270,180,270,270,270,270,180,90,
				270,270,90,270,270,270,0,0,180,
				180,90,0,90,0,0,270,270
		    );
		  
		  db.addLevel(1,"1x37","plaatje",//levelpack,level,plaatje
		          //de buizen
				  7,1,1,1,1,1,1,7,
		          10,5,5,5,1,1,5,10,
		          10,5,3,1,1,3,14,9,
		          11,14,5,4,4,9,11,9,
		          10,9,10,8,8,9,8,11,
		          9,11,10,8,8,10,11,9,
		          9,14,1,4,4,1,13,1,
		          10,5,3,5,5,3,10,5,
		          10,1,1,5,5,1,13,1,
		          7,0,1,1,1,1,9,7,

		          //rotate van buizen: 0, 90, 180, 270

				180,0,90,90,90,180,90,90,0,
				180,180,180,180,180,180,270,90,180,
				90,90,270,180,180,270,180,90,90,
				90,90,180,0,270,270,270,0,90,
				90,0,270,180,270,270,90,0,180,
				0,180,0,0,0,90,0,90,0,
				0,180,270,90,90,90,0,270,90,
				90,90,90,0,90,270,180,180,270,
				180,270,180,0,270,90,0,0
		    );
		  
		  db.addLevel(1,"1x38","plaatje",//levelpack,level,plaatje
		          //de buizen
				  0,0,0,0,8,9,15,0,
		          9,10,10,10,9,9,9,0,
		          10,0,8,16,10,9,9,0,
		          11,10,9,0,9,9,15,0,
		          10,1,5,5,5,1,1,4,
		          10,5,4,2,4,2,1,0,
		          7,1,5,6,5,1,0,0,
		          4,5,5,6,5,5,5,4,
		          1,2,2,2,5,2,5,1,
		          3,3,4,16,0,4,16,3,

		          //rotate van buizen: 0, 90, 180, 270

				270,0,0,0,90,180,90,0,180,
				180,180,0,90,270,0,180,270,90,
				0,90,0,90,180,270,90,270,0,
				0,180,180,90,270,270,90,270,180,
				90,180,180,180,0,0,90,180,0,
				270,0,0,270,0,0,90,270,90,
				0,270,180,90,0,0,0,180,180,
				180,90,0,270,270,180,90,90,90,
				270,180,90,90,90,180,90,180
		    
		    );
		  
		  
		  
		  
		  
		  
		  
		  
		  
		  
		  
		  
		  db.addLevel(1,"1x39","plaatje",//levelpack,level,plaatje
		          //de buizen
				  1,5,1,1,2,5,5,1,
		          2,2,6,2,1,2,5,1,
		          5,2,1,1,1,1,5,1,
		          1,1,1,5,1,1,1,5,
		          1,1,2,3,4,2,2,2,
		          5,2,6,2,1,1,1,5,
		          2,1,1,2,2,2,1,5,
		          1,2,1,5,2,6,2,5,
		          1,2,2,1,5,2,2,5,
		          1,5,5,5,2,1,1,1,

		          //rotate van buizen: 0, 90, 180, 270
		          270,180,90,180,270,0,270,180,
		    90,180,270,0,180,180,0,0,270,
		    0,180,90,180,270,90,180,90,270,
		    180,180,90,270,270,0,90,180,180,
		    270,90,270,0,0,270,0,0,270,
		    90,180,0,180,180,0,180,180,0,
		    0,0,90,270,270,270,270,270,0,
		    270,180,180,90,270,90,90,0,180,
		    270,90,90,270,270,90,180,180,180
		    );
		  
		  db.addLevel(1,"1x40","plaatje",//levelpack,level,plaatje
		          //de buizen
				  1,5,5,5,5,2,5,1,
		          5,1,2,2,1,4,1,1,
		          5,5,3,4,1,4,1,1,
		          5,1,5,2,2,1,1,1,
		          5,1,1,4,4,4,5,4,
		          4,4,1,2,5,4,1,2,
		          1,5,5,1,1,5,5,1,
		          2,4,3,4,2,1,1,1,
		          5,4,6,1,1,1,5,5,
		          1,5,1,4,1,5,1,3,

		          //rotate van buizen: 0, 90, 180, 270
		          180,90,270,270,90,180,180,180,
		    0,270,90,0,180,0,90,90,180,
		    0,270,180,0,90,270,270,90,180,
		    90,90,270,0,0,0,180,180,180,
		    0,270,90,180,0,270,0,90,0,
		    0,0,270,270,90,0,90,90,0,
		    180,180,90,270,270,180,90,90,180,
		    270,180,270,270,0,90,270,180,90,
		    180,270,0,0,0,90,0,90,270
		    
		    );
		
		
	}
	private void setSettingsLevelPack1(){
		SharedPreferences settings = getSharedPreferences("levelsInDB", Context.MODE_PRIVATE);
    	Editor editor = settings.edit();
    	editor.putBoolean("LevelsInDatabase", true);
    	editor.commit();
	}
	
	
	private void addLevelsPack2Part1() {
		  db.addLevel(2,"2x1","plaatje",//levelpack,level,plaatje
				//de buizen                               
				  0,0,4,4,1,2,4,4,
				  0,0,1,6,1,3,1,2,
				  0,15,0,5,3,1,1,5,
				  0,0,0,5,1,1,1,1,
				0,0,0,1,5,1,1,1,
				0,16,15,0,4,5,1,2,
				0,0,0,0,1,2,5,4,
				1,5,1,1,3,2,6,4,
				2,1,1,1,4,1,2,4,
				4,1,5,5,5,5,2,4,
				                         //rotate van buizen: 
			      180,90,270,270,90,180,180,180,
				    0,270,90,0,180,0,90,90,180,
				    0,270,180,0,90,270,270,90,180,
				    90,90,270,0,0,0,180,180,180,
				    0,270,90,180,0,270,0,90,0,
				    0,0,270,270,90,0,90,90,0,
				    180,180,90,270,270,180,90,90,180,
				    270,180,270,270,0,90,270,180,90,
				    180,270,0,0,0,90,0,90,270    
				
				   );                             
		  db.addLevel(2,"2x2","plaatje",//levelpack,level,plaatje
				         //de buizen                              
				1,1,1,2,1,1,2,1,
				5,5,3,1,2,1,2,5,    
				5,1,5,5,1,1,1,4,
				1,5,5,1,1,6,5,4,  
				4,1,1,1,1,5,1,1,
				5,4,1,5,5,1,3,5,  
				5,1,1,1,5,5,1,5,
				5,5,5,1,5,3,5,5,  
				5,4,1,5,5,5,1,5,
				1,5,5,5,5,5,5,1,
				                         //rotate van buizen: 0, 90, 180,
				//270                                                             
				180,180,270,180,180,90,270,270,90,                              90,0,180,180,270,90,270,0,90,                           90,270,180,90,180,270,180,180,180,                              270,270,0,0,0,0,180,180,90,                             180,90,270,0,180,0,0,270,180,                           0,90,0,0,270,180,180,270,270,                           90,270,270,270,90,0,0,180,180,                          0,0,90,180,270,270,0,0,0,                               0,180,90,0,0,0,90,270
				   );             
		  
		  db.addLevel(2,"2x3","plaatje",//levelpack,level,plaatje
				     //de buizen                                  
				1,1,1,1,1,2,5,4,  
			    5,5,5,5,5,5,1,1,
				5,1,1,1,1,1,1,5,   
				1,5,1,1,5,5,5,1,
				3,1,5,5,1,5,5,1,       
				4,5,4,5,5,1,1,5,
				5,1,1,5,5,5,5,5,      
				1,1,5,5,5,5,3,5,
				1,1,5,5,5,1,5,1,    
				1,5,1,1,2,5,5,4,
				                       
				90,270,0,270,0,180,180,90,90,                           270,90,180,180,0,270,180,0,90,                          0,180,90,180,270,180,90,0,180,                          0,0,0,0,0,270,90,270,90,                                90,0,180,0,180,90,180,180,270,                          270,270,90,270,180,180,270,180,180,                             180,90,270,270,90,270,90,90,270,                                270,0,270,0,180,270,180,0,270,                          0,180,0,90,180,180,0,270
				   );                             
		  
		  db.addLevel(2,"2x4","plaatje",//levelpack,level,plaatje
				         //de buizen                            
				  1,5,1,0,0,1,5,1,
				1,1,5,1,1,1,1,5,                          1,1,1,1,1,1,5,5,
				1,1,1,1,1,1,5,5,                          4,1,1,3,1,1,5,5,
				2,5,4,0,4,1,1,5,                          5,1,1,1,1,4,1,1,
				2,1,1,2,5,1,1,1,                          1,1,1,1,1,1,1,1,
				0,1,1,1,1,1,2,4,       90,270,180,0,0,270,180,270,90,                          90,90,180,90,0,180,0,90,90,                             0,0,180,180,180,90,180,90,0,                            90,180,270,180,0,0,0,180,0,                             90,0,270,90,270,90,180,0,180,                           180,270,180,90,0,270,0,270,0,                           90,180,0,180,0,270,0,270,90,                            90,90,0,270,270,0,0,90,180,                             180,90,90,90,90,270,90,180
				   );                            
		  
		  db.addLevel(2,"2x5","plaatje",//levelpack,level,plaatje
				         //de buizen                             
				1,5,3,1,5,4,1,1,
				1,4,3,2,4,1,1,5,            
				1,5,5,1,1,1,16,5,
				1,5,1,5,5,4,1,5,     
				1,5,1,1,2,5,1,5,
				4,1,5,1,15,1,5,1,    
				0,1,1,5,3,2,3,0,
				1,5,1,1,5,1,1,1,     
				1,5,1,0,1,5,5,1,
				15,0,4,0,1,5,5,4,
				                    
				0,90,0,90,0,180,180,0,270,                                      270,180,180,270,0,180,0,270,90,                                 180,90,90,90,270,270,180,90,0,                                  0,90,0,0,90,90,180,270,0,                                       180,270,180,270,180,270,180,180,180,                                    180,180,0,0,0,0,270,0,0,                                        180,180,180,270,270,0,90,0,180,                                 90,270,270,0,90,180,0,0,270,                                    180,270,0,180,180,0,270,270
				   );                         
		  
		  db.addLevel(2,"2x6","plaatje",//levelpack,level,plaatje
				         //de buizen               
				1,3,1,1,1,1,4,4,
				1,5,1,5,5,1,2,2,        
				4,1,5,1,5,1,5,1,
				1,2,5,5,1,1,2,1,     
				1,1,3,1,4,1,2,1,
				5,5,1,1,1,2,5,4,     
				5,1,1,1,5,2,4,4,
				2,5,5,1,3,1,5,1,     
				1,2,5,1,2,5,2,4,
				0,4,0,1,1,0,4,0,
				                         //rotate van buizen: 0, 90, 180, 270
				                               0,90,180,270,180,180,0,90,0,                            0,0,90,0,180,180,0,0,90,                                270,270,0,180,180,270,180,90,90,                                0,180,270,0,0,0,90,270,270,                             0,180,180,180,270,0,180,270,270,                                270,270,90,90,270,270,270,270,90,                               270,270,180,270,270,90,180,180,0,                               0,270,90,180,180,0,180,180,270,                         0,180,180,0,270,0,270,90
				   );   
		  
		  
				db.addLevel(2,"2x7","plaatje",//levelpack,level,plaatje
				//de buizen                           
				1,3,1,1,7,9,10,9,      
				1,1,5,1,14,9,9,9,
				1,1,1,1,5,9,11,8,    
				1,1,1,1,1,13,5,1,
				8,14,1,8,9,10,1,1,     
				8,11,11,10,11,10,1,1,
				8,9,11,8,9,14,5,1,      
				3,9,12,10,10,14,1,4,
				5,1,13,1,8,10,1,1,      
				1,1,8,4,9,11,10,8,
				                         //rotate van buizen: 0, 90, 180, 270
				                                       90,90,90,180,270,90,90,270,270,                                 0,90,180,180,0,90,0,270,270,                                    180,0,270,270,90,180,270,0,180,                                 90,270,270,270,0,270,270,90,180,                                        270,90,0,0,180,180,90,0,90,                                     90,180,180,270,0,180,90,0,180,                                  270,0,0,0,180,0,270,270,0,                                      180,90,180,0,0,180,270,180,270,                                 90,90,0,0,180,0,90,90
				   );                   
				
				db.addLevel(2,"2x8","plaatje",//levelpack,level,plaatje
				         //de buizen                  
				3,5,1,1,1,4,2,4,
				4,2,2,1,5,4,6,4,            
				15,1,1,0,1,5,2,1,
				8,11,13,10,11,10,9,4,    
				9,14,1,0,9,9,9,8,
				10,5,1,5,1,10,0,0,     
				10,1,1,3,1,14,9,7,
				9,10,10,14,5,1,9,9,     
				0,9,10,12,10,9,0,16,
				0,8,0,8,0,9,8,0,
				                         //rotate van buizen: 0, 90, 180, 270
				                               270,180,90,180,270,90,90,180,0,                         90,180,270,90,180,0,90,90,0,                            180,180,90,90,180,180,90,0,270,                         90,0,180,0,90,270,270,90,180,                           0,0,270,90,90,90,180,180,90,                            180,0,0,270,0,180,270,0,270,                            0,90,0,270,270,0,180,90,0,                              90,270,180,0,0,90,90,90,0,                              180,180,90,270,0,0,0,0
				   );       
				
				
				db.addLevel(2,"2x9","plaatje",//levelpack,level,plaatje
				         //de buizen                 
				4,5,5,2,1,1,4,7,
				8,10,9,3,1,6,4,10,       
				9,9,9,10,9,4,9,9,
				10,9,7,1,14,9,9,9,     
				9,11,8,5,5,9,10,9,
				9,11,1,1,1,5,5,3,      
				9,11,1,5,5,5,5,1,
				9,14,5,4,4,1,1,1,     
				8,5,1,1,3,5,1,1,
				4,2,1,1,1,1,5,1,
                                    0,180,0,270,90,90,90,180,180,                                   0,180,270,0,180,180,0,90,90,                                    0,90,270,0,270,180,0,90,90,                                     180,270,90,180,0,0,90,90,0,                                     180,180,0,90,180,270,270,180,270,                                       0,270,270,180,270,90,270,90,0,                                  180,180,270,180,180,180,0,270,0,                                        0,270,180,180,180,180,90,270,90,                                        180,270,270,180,180,90,0,270
				   );                  
				
				db.addLevel(2,"2x10","plaatje",//levelpack,level,plaatje
				         //de buizen            
				4,1,5,5,2,5,1,4,
				1,1,1,5,14,8,1,1,               
				7,9,5,7,9,9,9,9,
				9,9,3,9,11,11,9,10,         
				10,4,9,9,9,9,9,9,
				8,5,8,11,8,9,9,7,         
				1,1,1,14,9,9,10,9,
				5,1,1,5,10,9,9,3,        
				5,1,1,5,9,10,9,5,
				1,5,1,1,5,5,5,1,
				                         //rotate van buizen: 0, 90, 180, 270
				180,180,180,180,180,270,180,0,180,
				180,90,90,270,180,0,180,90,90,
				0,0,180,180,180,90,0,270,270,
				90,90,180,270,270,180,180,0,270,
				270,90,180,0,0,180,270,180,270,
				180,270,180,270,0,180,270,90,270,
				270,90,270,90,0,180,270,0,180,
				270,180,0,180,270,0,90,180,90,                    90,270,0,270,270,270,0,270
				   );
				
				
				 db.addLevel(2,"2x11","plaatje",//levelpack,level,plaatje
				          //de buizen
						  3,1,5,2,1,1,1,4,
				          1,1,1,1,1,1,1,2,
				          0,4,1,1,1,3,5,1,
				          1,1,1,1,1,1,1,3,
				          5,3,1,1,1,1,1,1,
				          1,1,1,1,1,1,1,1,
				          0,1,1,0,1,1,1,1,
				          0,1,1,1,1,0,1,1,
				          1,1,1,1,1,2,1,0,
				          1,4,4,5,1,1,5,4,

				          //rotate van buizen: 0, 90, 180, 270

							90,0,180,90,270,90,0,180,90,
							90,0,90,90,90,270,0,90,270,
							180,0,0,270,270,270,90,90,270,
							0,90,0,0,0,270,270,180,0,
							90,0,0,270,180,0,270,0,0,
							270,270,180,180,180,270,90,90,180,
							0,270,90,0,270,0,270,90,90,
							0,180,180,0,270,0,0,180,0,
							90,180,270,180,90,0,90,0
				    );
				  
				  db.addLevel(2,"2x12","plaatje",//levelpack,level,plaatje
				          //de buizen
						  1,5,1,1,5,5,5,1,
				          4,1,1,1,5,1,1,1,
				          0,1,1,1,2,2,1,1,
				          0,1,1,5,3,5,3,4,
				          0,1,1,1,5,1,1,1,
				          1,4,1,1,1,1,1,1,
				          1,2,3,1,1,1,1,4,
				          0,5,1,1,1,1,1,1,
				          0,5,5,5,5,5,1,1,
				          0,1,1,1,1,1,5,1,

				          //rotate van buizen: 0, 90, 180, 270

							90,270,0,90,270,90,90,270,270,
							180,180,90,0,90,90,0,180,0,
							180,0,0,0,0,90,0,90,270,
							270,270,90,180,180,90,270,0,0,
							0,180,180,270,180,180,90,180,90,
							0,180,180,90,0,270,90,270,90,
							90,0,180,90,270,180,270,270,0,
							90,180,270,180,180,90,270,270,0,
							270,180,90,270,0,180,0,270
				    );
				  
				  db.addLevel(2,"2x13","plaatje",//levelpack,level,plaatje
				          //de buizen
						  4,3,4,3,4,3,4,3,
				          5,5,2,2,5,5,1,2,
				          2,1,2,1,2,1,1,2,
				          1,5,6,5,1,1,2,5,
				          1,1,2,5,2,1,5,5,
				          5,1,1,1,1,1,6,1,
				          1,5,1,1,1,5,1,1,
				          0,1,2,0,2,2,1,1,
				          1,1,2,1,5,1,1,0,
				          1,5,1,1,1,0,0,16,

				          //rotate van buizen: 0, 90, 180, 270

							270,0,180,0,0,270,180,270,180,
							180,90,180,270,180,270,0,180,0,
							270,180,0,180,90,0,0,270,0,
							0,90,180,0,270,90,180,270,180,
							270,90,270,270,0,270,0,270,270,
							180,0,90,270,180,0,180,90,0,
							180,90,90,90,0,180,0,180,180,
							180,90,270,180,270,180,270,90,270,
							270,0,90,270,0,180,180,180
				    );
				  
				  db.addLevel(2,"2x14","plaatje",//levelpack,level,plaatje
				          //de buizen
						  4,1,5,5,1,1,1,4,
				          2,1,1,1,1,2,2,5,
				          5,1,1,1,1,1,1,5,
				          5,2,3,1,1,1,1,5,
				          1,2,0,1,1,4,1,2,
				          3,1,1,1,1,5,1,1,
				          1,1,1,1,4,1,1,4,
				          1,2,5,5,2,1,1,2,
				          2,5,1,1,1,1,1,5,
				          1,4,1,1,1,5,5,1,

				          //rotate van buizen: 0, 90, 180, 270
							
							0,90,270,0,90,90,180,270,0,
							0,90,90,270,0,0,90,270,270,
							90,180,0,90,90,180,0,90,180,
							180,0,90,90,90,0,0,0,90,
							180,90,270,270,0,270,0,90,90,
							90,90,90,270,180,270,90,270,0,
							270,270,180,0,270,0,90,180,270,
							270,180,180,270,180,0,0,90,90,
							180,180,90,90,0,180,0,0
				    );
				  
				  db.addLevel(2,"2x15","plaatje",//levelpack,level,plaatje
				          //de buizen
						  0,1,5,4,1,1,1,1,
				          1,1,1,1,5,5,5,5,
				          2,1,3,1,1,1,1,5,
				          5,1,5,1,16,0,1,1,
				          1,1,4,1,1,1,1,15,
				          16,1,1,3,1,1,4,1,
				          1,5,4,5,0,1,1,5,
				          2,1,1,2,2,1,1,1,
				          4,2,1,0,1,1,0,0,
				          4,1,0,15,0,4,0,16,

				          //rotate van buizen: 0, 90, 180, 270
							
							270,0,0,180,270,90,90,0,90,
							180,270,180,270,180,0,90,270,90,
							90,0,90,90,90,270,90,90,180,
							270,270,0,180,270,90,90,180,180,
							180,90,180,180,270,180,180,90,270,
							90,180,0,90,90,270,180,180,180,
							270,0,180,90,270,0,180,180,0,
							0,180,0,90,180,180,180,90,0,
							270,180,0,0,90,270,90,270
				    );
				  
				  db.addLevel(2,"2x16","plaatje",//levelpack,level,plaatje
				          //de buizen
						  1,1,1,2,1,1,1,3,
				          5,1,1,5,1,2,1,2,
				          1,1,4,5,1,1,1,2,
				          3,1,1,5,5,1,1,5,
				          1,1,4,1,1,4,1,1,
				          0,1,2,4,4,1,6,4,
				          1,4,1,2,1,2,1,4,
				          2,1,1,1,4,1,3,4,
				          5,1,1,1,6,4,1,2,
				          1,5,5,1,1,5,1,4,

				          //rotate van buizen: 0, 90, 180, 270

							0,270,270,180,90,90,0,0,0,
							270,180,0,270,180,0,0,180,180,
							180,270,90,180,0,90,90,0,270,
							90,270,0,180,0,90,0,90,90,
							180,270,180,90,0,0,180,270,180,
							180,180,270,180,0,0,90,90,0,
							180,90,0,180,0,180,0,270,0,
							90,0,90,0,90,0,0,0,270,
							180,90,270,90,180,90,90,90
				    );
				  
				  db.addLevel(2,"2x17","plaatje",//levelpack,level,plaatje
				          //de buizen
						  1,5,3,0,1,1,9,8,
				          1,5,1,1,1,1,14,9,
				          1,5,1,1,1,1,1,10,
				          1,5,1,1,1,1,1,10,
				          1,5,1,1,1,1,1,10,
				          1,5,1,1,1,1,1,10,
				          0,0,1,1,0,1,14,11,
				          4,1,1,1,1,14,11,11,
				          0,1,1,1,14,9,9,9,
				          15,0,7,10,9,0,9,8,

				          //rotate van buizen: 0, 90, 180, 270

							0,0,0,270,270,180,180,0,90,
							180,180,90,0,180,270,0,270,180,
							90,90,270,0,180,270,0,270,180,
							90,270,90,90,180,270,180,180,180,
							180,90,0,90,0,90,180,270,90,
							270,90,180,90,90,270,90,90,270,
							0,90,90,90,270,90,180,180,0,
							90,0,90,90,90,270,0,270,90,
							0,270,0,0,270,0,90,270
				    );
				  
				  
				  db.addLevel(2,"2x18","plaatje",//levelpack,level,plaatje
				          //de buizen
						  7,9,9,9,9,9,9,9,
				          1,14,9,9,9,10,10,10,
				          5,1,1,0,0,10,10,10,
				          1,1,1,1,4,14,9,10,
				          8,14,1,1,1,1,1,10,
				          0,10,1,1,3,1,14,9,
				          0,10,9,14,5,1,9,9,
				          0,9,11,12,11,9,9,9,
				          0,0,0,9,9,9,9,0,
				          0,15,0,0,0,0,16,0,

				          //rotate van buizen: 0, 90, 180, 270

							180,0,180,270,90,0,0,270,90,
							90,0,270,90,0,180,0,180,90,
							0,0,90,180,0,0,0,0,180,
							270,270,270,0,270,270,0,0,90,
							270,0,180,0,180,0,0,90,0,
							180,0,90,180,90,270,0,90,180,
							180,180,0,270,270,180,90,90,270,
							180,180,270,270,270,180,0,90,270,
							0,0,270,90,90,0,0,180
				    );
				  
				  
				  db.addLevel(2,"2x19","plaatje",//levelpack,level,plaatje
				          //de buizen
						  9,9,9,9,9,10,10,9,
				          10,9,9,9,14,1,9,9,
				          9,9,0,1,1,1,14,7,
				          0,9,9,2,2,1,1,1,
				          9,9,10,5,5,5,0,4,
				          10,9,14,1,3,1,1,4,
				          9,9,1,5,1,4,2,1,
				          0,9,9,1,1,4,5,1,
				          0,8,9,14,5,5,5,1,
				          0,9,10,11,10,10,10,8,

				          //rotate van buizen: 0, 90, 180, 270
							
							180,270,90,90,0,270,90,270,270,
							180,270,0,270,180,0,270,270,180,
							180,90,270,180,90,90,0,270,270,
							270,0,90,180,0,180,0,270,180,
							0,0,270,270,180,270,0,0,0,
							90,180,0,180,270,90,0,90,270,
							0,270,90,0,90,180,0,90,90,
							180,270,90,270,270,180,180,270,180,
							180,270,180,0,270,0,180,0
				    );
				  
				  db.addLevel(2,"2x20","plaatje",//levelpack,level,plaatje
				          //de buizen
						  1,1,7,9,9,9,10,9,
				          5,1,14,9,9,14,1,8,
				          1,1,1,2,5,1,1,4,
				          8,1,4,1,1,7,10,9,
				          9,10,9,1,1,1,1,10,
				          0,0,10,2,5,1,3,10,
				          1,1,9,13,10,10,10,9,
				          5,1,5,2,1,1,5,1,
				          1,1,4,1,1,5,1,1,
				          0,1,1,1,5,1,1,4,

				          //rotate van buizen: 0, 90, 180, 270
							
							90,0,90,0,0,180,90,270,270,
							180,0,180,90,90,90,270,270,270,
							0,0,90,180,90,270,90,180,180,
							90,90,90,0,90,270,270,0,90,
							180,90,270,90,0,0,90,180,0,
							90,0,180,0,90,0,270,180,90,
							0,270,90,0,0,270,270,180,270,
							180,270,90,0,90,180,0,270,0,
							270,180,270,90,90,180,0,90
				    );
	}
	
	private void addLevelsPack2Part2() {		  
				  db.addLevel(2,"2x21","plaatje",//levelpack,level,plaatje
				          //de buizen
						  3,1,1,5,2,5,5,4,
						  15,1,6,1,5,16,1,1,
						  1,5,6,1,1,5,1,5,
						  1,1,1,1,15,1,1,5,
						  0,1,4,4,1,1,4,5,
						  1,5,5,3,5,7,4,1,
						  1,5,5,5,1,9,10,9,
						  0,16,9,10,10,9,8,9,
						  7,10,12,10,10,12,10,9,
						  15,0,9,10,8,9,8,8,
						  
						  //rotate van buizen: 0, 90, 180, 270
						  90,180,180,0,0,180,0,90,90,
						  90,90,90,180,180,90,270,0,270,
						  90,90,180,180,270,90,90,180,180,
						  90,0,180,270,90,0,180,180,90,
						  0,180,270,90,0,0,180,180,270,
						  0,180,270,270,0,0,90,180,0,
						  270,0,180,180,180,180,90,180,0,
						  180,0,270,0,90,90,270,180,180,
						  0,90,90,270,90,270,270,90
						  );
				  db.addLevel(2,"2x22","plaatje",//levelpack,level,plaatje
				          //de buizen
						  0,4,1,0,1,1,0,15,
						  1,5,1,1,1,2,5,4,
						  5,3,5,1,16,5,1,1,
						  5,15,0,1,5,6,1,4,
						  2,5,5,1,7,5,4,0,
						  1,1,9,10,9,5,1,1,
						  1,1,11,10,9,1,5,1,
						  1,3,10,8,9,16,9,9,
						  9,10,11,10,9,0,10,8,
						  8,0,15,0,9,10,9,0,
						  
						  //rotate van buizen: 0, 90, 180, 270
						  90,270,0,90,270,270,0,270,180,
						  270,180,270,0,90,180,90,0,90,
						  270,0,0,270,180,0,180,0,90,
						  90,180,90,0,0,0,90,90,0,
						  90,180,0,270,180,180,270,270,0,
						  90,0,0,270,270,90,270,270,0,
						  0,90,0,90,180,270,270,270,270,
						  270,0,90,0,180,0,0,90,180,
						  270,0,90,270,180,180,0,90
						  );
				  db.addLevel(2,"2x23","plaatje",//levelpack,level,plaatje
				          //de buizen
						  9,10,10,9,3,5,1,15,
						  11,10,9,9,9,16,1,1,
						  9,9,9,9,8,1,5,1,
						  9,9,15,7,9,13,10,9,
						  9,10,10,10,9,5,9,9,
						  0,1,5,5,2,1,9,9,
						  16,1,5,1,1,5,1,10,
						  0,1,5,2,8,10,13,9,
						  4,1,4,1,1,4,5,4,
						  0,15,1,5,2,1,1,1,
						  
						  //rotate van buizen: 0, 90, 180, 270
						  180,270,0,180,270,90,180,0,180,
						  90,0,180,270,0,270,270,0,0,
						  270,90,270,180,0,0,90,180,180,
						  180,0,0,270,270,0,270,90,270,
						  0,0,0,270,90,90,90,0,180,
						  90,270,270,90,270,90,0,180,180,
						  90,270,90,270,90,90,270,0,0,
						  0,270,180,270,0,180,0,270,270,
						  90,90,0,0,180,0,270,0
						  );
				  db.addLevel(2,"2x24","plaatje",//levelpack,level,plaatje
				          //de buizen
						  8,10,9,1,5,3,7,9,
						  0,9,9,5,9,10,10,9,
						  15,10,1,1,10,1,5,1,
						  9,11,5,9,9,5,1,1,
						  10,9,13,9,1,1,1,4,
						  9,9,1,5,2,1,5,4,
						  16,9,11,9,5,1,5,1,
						  9,10,9,9,13,9,1,1,
						  9,11,10,10,13,9,5,15,
						  16,8,4,5,2,5,1,0,
						  
						  //rotate van buizen: 0, 90, 180, 270
						  0,270,180,180,90,180,90,90,0,
						  0,0,180,180,270,180,180,270,270,
						  90,0,270,0,270,0,270,0,270,
						  90,180,0,90,180,270,270,0,90,
						  180,180,270,270,270,270,90,90,270,
						  0,0,180,0,90,180,270,180,180,
						  0,90,180,270,180,90,270,0,270,
						  180,0,0,270,180,270,270,180,180,
						  270,0,0,180,0,0,0,90
						  );
				  db.addLevel(2,"2x25","plaatje",//levelpack,level,plaatje
				          //de buizen
						  1,5,5,2,5,5,5,1,
						  4,9,9,5,15,1,5,1,
						  8,9,11,1,5,2,1,4,
						  9,10,12,9,1,5,2,5,
						  0,16,10,10,3,0,1,1,
						  7,0,9,11,1,5,2,4,
						  10,9,10,9,1,1,1,4,
						  10,7,9,10,10,13,10,9,
						  9,10,9,1,5,1,9,9,
						  15,0,16,1,5,3,9,8,
						  
						  //rotate van buizen: 0, 90, 180, 270
						  0,90,180,270,90,0,0,90,270,
						  90,180,180,90,90,270,180,90,0,
						  180,270,180,0,270,90,90,90,270,
						  90,0,0,0,0,180,270,0,270,
						  270,0,90,180,180,270,90,0,90,
						  0,180,180,0,0,180,270,90,180,
						  90,180,0,90,270,0,180,0,0,
						  0,270,90,0,270,180,90,90,0,
						  0,180,0,90,270,270,0,0
						  );
				  db.addLevel(2,"2x26","plaatje",//levelpack,level,plaatje
				          //de buizen
						  1,5,1,9,10,10,9,15,
						  2,4,1,13,1,9,11,9,
						  5,3,5,13,1,10,8,9,
						  1,1,8,10,0,9,10,9,
						  16,5,10,9,10,9,15,10,
						  1,1,9,10,10,11,7,10,
						  5,1,2,1,16,9,8,8,
						  1,1,5,5,7,9,10,9,
						  1,4,5,4,10,0,9,9,
						  1,5,1,0,9,10,9,15,
						  
						  //rotate van buizen: 0, 90, 180, 270
						  180,180,270,180,270,270,0,90,0,
						  90,270,90,90,90,0,180,90,270,
						  270,90,0,180,180,90,0,90,0,
						  90,0,0,90,270,180,0,180,180,
						  0,180,0,0,270,270,180,0,90,
						  180,270,270,180,180,90,270,0,270,
						  90,90,0,90,270,90,90,0,0,
						  0,90,270,270,90,90,270,180,90,
						  270,90,180,0,0,90,0,180
						  );
				  db.addLevel(2,"2x27","plaatje",//levelpack,level,plaatje
				          //de buizen
						  15,1,1,1,1,7,9,0,
						  0,3,1,2,2,0,9,9,
						  16,0,1,5,2,1,9,9,
						  0,0,1,5,1,1,13,1,
						  4,5,2,5,1,15,10,5,
						  1,1,5,16,9,10,9,5,
						  5,1,6,1,10,4,5,1,
						  2,5,1,4,10,9,10,9,
						  1,1,1,4,10,10,8,11,
						  0,1,1,15,9,9,8,9,
						  
						  //rotate van buizen: 0, 90, 180, 270
						  0,0,0,0,90,0,90,270,90,
						  90,180,270,90,270,90,270,90,180,
						  180,90,90,90,0,0,90,0,0,
						  0,270,180,270,0,270,270,0,90,
						  270,90,90,0,180,0,0,0,270,
						  180,0,90,90,180,270,180,0,270,
						  180,90,0,270,90,0,180,0,0,
						  90,0,0,270,0,180,0,90,0,
						  0,90,90,0,270,90,180,90
						  );
				  db.addLevel(2,"2x28","plaatje",//levelpack,level,plaatje
				          //de buizen
						  0,9,10,10,8,0,9,9,
						  15,9,10,9,9,11,9,8,
						  9,10,11,9,9,12,11,9,
						  8,16,9,10,11,9,10,8,
						  9,10,10,9,10,9,11,16,
						  11,10,9,11,9,9,12,9,
						  9,9,8,9,10,7,10,10,
						  9,12,10,9,8,10,11,10,
						  10,10,9,11,10,10,12,9,
						  9,11,9,16,8,10,9,0,
						  
						  //rotate van buizen: 0, 90, 180, 270
						  0,90,270,180,180,0,0,0,180,
						  90,270,90,0,0,270,270,0,180,
						  0,90,270,180,90,90,0,90,90,
						  180,0,0,0,0,90,270,270,0,
						  0,270,0,180,90,270,0,90,0,
						  270,0,0,180,90,180,180,0,270,
						  270,90,90,0,0,90,90,0,90,
						  180,0,90,180,0,90,270,270,180,
						  180,0,270,180,0,0,270,270
						  );
				  db.addLevel(2,"2x29","plaatje",//levelpack,level,plaatje
				          //de buizen
						  9,10,9,15,9,11,10,9,
						  9,7,10,9,9,9,9,10,
						  9,8,9,12,10,9,9,11,
						  9,9,8,8,9,9,9,9,
						  8,9,11,9,9,11,9,16,
						  9,9,9,12,10,9,8,9,
						  0,9,11,9,10,10,11,9,
						  15,7,11,9,8,10,11,16,
						  9,11,9,9,11,10,11,9,
						  9,9,9,10,9,8,10,9,
						  
						  //rotate van buizen: 0, 90, 180, 270
						  270,90,0,180,180,270,90,270,90,
						  270,0,270,270,180,180,270,90,0,
						  180,90,270,0,180,270,0,90,90,
						  0,0,0,90,0,90,180,180,270,
						  90,0,180,180,270,270,180,180,180,
						  0,180,0,90,90,90,90,90,0,
						  0,180,180,180,270,270,180,0,270,
						  0,270,180,0,0,180,270,270,180,
						  180,180,90,90,270,270,180,0
						  );
				  db.addLevel(2,"2x30","plaatje",//levelpack,level,plaatje
				          //de buizen
						  15,9,10,9,16,9,10,9,
						  9,9,9,12,10,12,9,10,
						  8,9,12,9,8,11,9,8,
						  0,10,10,7,9,9,10,9,
						  9,12,9,7,12,9,9,11,
						  9,11,9,10,11,10,9,10,
						  15,10,11,10,9,9,11,9,
						  9,11,11,9,9,12,9,8,
						  9,10,9,11,8,10,9,9,
						  8,10,9,9,10,11,9,16,
						  
						  //rotate van buizen: 0, 90, 180, 270
						  180,180,90,270,90,90,270,90,90,
						  270,180,180,90,0,0,270,0,180,
						  0,270,0,90,90,180,0,180,90,
						  180,90,90,0,270,0,180,270,90,
						  270,270,180,90,180,90,270,270,90,
						  0,180,90,270,270,0,270,0,180,
						  180,90,90,270,270,180,90,270,180,
						  90,180,90,180,180,0,90,270,270,
						  270,270,180,0,270,90,90,180
						  );
				
				  
				  
				  db.addLevel(2,"2x31","plaatje",//levelpack,level,plaatje
				          //de buizen
						  7,9,7,9,9,10,11,7,
						  15,10,0,9,12,10,12,9,
						  9,12,10,9,10,16,10,10,
						  11,9,8,9,11,10,11,9,
						  9,10,11,9,9,10,9,16,
						  9,10,10,12,11,10,12,9,
						  9,9,9,12,9,9,11,10,
						  8,12,9,10,9,12,9,8,
						  8,9,9,9,10,12,9,15,
						  9,10,9,8,10,9,9,8,
						  
						  //rotate van buizen: 0, 90, 180, 270
						  270,0,0,270,180,180,90,270,180,
						  90,180,180,180,180,180,0,180,0,
						  90,90,0,270,180,90,270,90,180,
						  180,90,90,270,90,180,0,90,90,
						  180,270,0,90,0,180,270,270,90,
						  90,270,270,90,90,90,180,0,270,
						  270,0,90,90,180,270,270,180,0,
						  90,180,180,270,90,90,270,180,90,
						  180,180,90,270,270,90,180,90
						  );
				  db.addLevel(2,"2x32","plaatje",//levelpack,level,plaatje
				          //de buizen
						  8,10,9,9,10,10,9,8,
						  9,10,12,9,8,9,11,9,
						  9,9,10,9,10,9,9,9,
						  9,12,11,12,10,10,11,11,
						  11,9,9,11,10,9,9,11,
						  9,9,10,7,9,10,9,9,
						  0,9,12,11,9,10,9,8,
						  8,15,10,10,9,11,9,16,
						  10,9,9,9,11,15,9,8,
						  9,11,10,8,9,10,8,0,
						  
						  //rotate van buizen: 0, 90, 180, 270
						  180,90,180,270,180,180,180,0,270,
						  180,90,90,0,90,180,270,270,0,
						  0,270,180,0,0,0,0,180,270,
						  180,0,180,180,270,270,90,270,180,
						  270,90,270,270,270,0,0,0,180,
						  270,270,90,270,0,90,90,0,90,
						  180,90,0,90,270,90,270,180,0,
						  270,270,270,90,270,90,0,180,0,
						  90,180,0,270,90,0,90,90
						  );
				  db.addLevel(2,"2x33","plaatje",//levelpack,level,plaatje
				          //de buizen
						  7,8,10,9,8,10,9,15,
						  9,10,9,9,9,8,9,9,
						  9,11,9,9,11,9,10,11,
						  10,9,10,9,10,9,10,9,
						  11,10,9,7,12,9,9,9,
						  10,9,12,10,11,10,9,10,
						  9,12,11,9,8,9,10,11,
						  9,9,10,9,11,9,16,10,
						  10,15,9,9,9,9,7,9,
						  8,8,10,11,8,9,10,8,
						  
						  //rotate van buizen: 0, 90, 180, 270
						  270,0,180,0,0,90,180,180,90,
						  90,180,270,180,270,270,90,0,90,
						  90,90,0,270,0,0,90,90,0,
						  180,0,270,270,0,0,90,90,90,
						  270,0,0,90,90,270,0,270,180,
						  0,90,270,180,180,0,180,180,90,
						  270,270,270,270,180,270,270,90,0,
						  0,180,90,180,90,90,180,180,180,
						  90,270,180,0,270,270,270,90
						  );
				  db.addLevel(2,"2x34","plaatje",//levelpack,level,plaatje
				          //de buizen
						  9,11,9,0,9,10,9,15,
						  10,9,11,11,11,10,12,9,
						  9,7,9,12,10,11,12,9,
						  16,9,9,9,9,10,9,9,
						  8,10,9,11,12,9,15,10,
						  9,9,11,11,8,9,11,9,
						  9,9,10,9,10,11,11,9,
						  8,9,12,10,9,10,11,11,
						  0,9,12,10,11,9,9,10,
						  8,9,9,10,9,16,8,9,
						  
						  //rotate van buizen: 0, 90, 180, 270
						  180,270,180,180,270,0,180,270,270,
						  0,0,90,0,180,180,0,90,90,
						  180,0,180,270,90,270,0,0,90,
						  180,180,0,180,0,270,0,270,270,
						  90,90,180,0,180,270,180,180,90,
						  90,270,180,180,90,180,90,0,0,
						  0,90,0,90,270,270,180,180,270,
						  180,180,180,90,270,0,0,0,180,
						  270,270,90,0,0,0,270,270
						  );
				  db.addLevel(2,"2x35","plaatje",//levelpack,level,plaatje
				          //de buizen
						  9,10,9,15,9,11,10,9,
						  10,9,12,10,11,9,11,9,
						  8,10,9,8,9,9,10,8,
						  16,7,9,11,10,12,9,10,
						  9,10,9,10,15,9,10,9,
						  9,10,9,11,10,11,9,0,
						  7,10,12,9,9,9,9,9,
						  9,11,9,9,11,10,10,11,
						  10,9,10,12,10,11,11,9,
						  9,8,8,9,8,9,9,8,
						  
						  //rotate van buizen: 0, 90, 180, 270
						  0,0,180,270,270,0,180,0,270,
						  90,0,270,90,90,180,270,180,270,
						  90,270,90,0,270,270,270,180,90,
						  270,180,270,0,270,270,180,180,180,
						  270,0,270,180,180,0,90,270,90,
						  0,180,0,270,0,270,90,0,270,
						  90,0,180,180,270,0,90,270,270,
						  90,180,180,0,90,270,270,270,90,
						  270,90,0,90,90,270,90,0
						  );
				  db.addLevel(2,"2x36","plaatje",//levelpack,level,plaatje
				          //de buizen
						  15,9,11,10,9,8,9,16,
						  9,11,12,9,9,7,9,9,
						  9,7,9,12,10,11,9,10,
						  9,8,9,11,9,9,12,9,
						  10,9,9,15,7,9,11,8,
						  9,12,10,11,10,9,10,10,
						  9,12,7,10,9,10,12,11,
						  11,9,16,9,12,9,7,10,
						  9,10,9,9,9,9,10,9,
						  0,7,9,9,10,7,16,0,
						  
						  //rotate van buizen: 0, 90, 180, 270
						  90,180,0,0,180,0,90,0,0,
						  270,0,180,270,270,270,180,180,90,
						  0,0,270,90,180,180,90,180,270,
						  90,90,90,0,180,0,90,270,270,
						  90,0,270,180,0,0,0,270,270,
						  0,180,180,180,270,180,90,0,90,
						  270,90,0,270,270,90,90,270,0,
						  90,90,270,90,270,0,90,90,0,
						  90,180,0,90,180,270,270,0
						  );
				  db.addLevel(2,"2x37","plaatje",//levelpack,level,plaatje
				          //de buizen
						  15,9,10,10,9,9,11,9,
						  9,11,7,9,11,11,11,10,
						  9,12,9,9,12,7,9,11,
						  9,12,11,9,11,9,10,11,
						  9,11,7,10,9,11,11,9,
						  16,9,11,9,0,7,10,15,
						  9,10,12,9,9,11,12,9,
						  8,9,11,9,12,9,11,11,
						  9,11,9,11,12,11,9,10,
						  9,11,10,9,9,10,10,9,
						  
						  //rotate van buizen: 0, 90, 180, 270
						  270,0,90,180,90,0,180,180,0,
						  0,180,0,270,0,270,180,90,180,
						  180,180,0,270,180,180,180,270,0,
						  0,90,180,270,90,270,0,270,90,
						  0,180,270,0,180,180,90,180,270,
						  0,90,90,270,270,270,0,270,90,
						  180,180,90,180,180,180,90,90,270,
						  0,180,270,90,180,90,90,270,0,
						  270,0,180,180,90,270,0,90
						  );
				  db.addLevel(2,"2x38","plaatje",//levelpack,level,plaatje
				          //de buizen
						  1,5,2,2,1,1,5,1,
						  2,5,6,2,1,2,3,5,
						  1,1,2,2,1,6,1,5,
						  1,6,1,1,2,1,5,2,
						  1,1,9,9,1,5,2,1,
						  9,7,10,11,9,9,13,9,
						  9,11,12,9,9,11,5,10,
						  9,11,11,9,9,10,4,10,
						  9,9,9,11,9,12,11,11,
						  8,11,8,9,8,9,9,8,

						  
						  //rotate van buizen: 0, 90, 180, 270
						  270,270,180,270,0,0,0,0,0,
						  180,270,270,270,180,270,0,0,270,
						  270,270,90,0,90,270,270,0,270,
						  90,90,90,90,90,0,0,0,0,
						  0,90,90,90,270,0,90,180,270,
						  90,270,270,0,180,180,90,270,270,
						  90,180,0,0,0,90,180,90,270,
						  180,90,270,270,180,90,0,0,0,
						  90,90,180,0,180,90,270,180
						  );
				  db.addLevel(2,"2x39","plaatje",//levelpack,level,plaatje
				          //de buizen
						  4,8,10,9,9,8,1,4,
						  2,2,3,11,11,10,13,9,
						  5,2,5,13,5,2,1,8,
						  2,2,9,11,9,5,9,9,
						  1,2,13,1,9,13,11,11,
						  8,10,9,5,1,2,4,10,
						  1,2,5,2,2,7,10,11,
						  1,2,8,11,13,10,11,9,
						  9,13,10,11,1,5,13,1,
						  8,1,4,9,10,10,9,4,
						  
						  //rotate van buizen: 0, 90, 180, 270
						  180,90,0,0,270,180,0,90,180,
						  270,90,270,90,180,270,270,270,180,
						  180,180,0,180,0,180,0,270,0,
						  0,270,0,0,180,90,90,180,90,
						  270,270,180,90,270,270,90,90,180,
						  90,0,90,270,270,0,0,90,90,
						  270,180,0,270,180,0,0,270,180,
						  90,0,90,180,270,0,90,90,270,
						  90,180,0,270,0,90,90,270
						  );
				  db.addLevel(2,"2x40","plaatje",//levelpack,level,plaatje
				          //de buizen
						  4,2,5,1,9,9,4,1,
						  7,13,11,13,11,9,9,5,
						  1,1,10,5,10,1,13,2,
						  1,2,13,6,13,2,13,1,
						  9,13,11,5,11,10,12,9,
						  11,13,11,13,9,4,9,9,
						  10,5,1,2,2,2,2,1,
						  8,2,1,7,1,5,6,1,
						  8,4,9,11,11,11,13,8,
						  9,10,11,10,11,9,1,3,
						  
						  //rotate van buizen: 0, 90, 180, 270
						  180,90,0,0,270,180,0,90,180,
						  270,90,270,90,180,270,270,270,180,
						  180,180,0,180,0,180,0,270,0,
						  0,270,0,0,180,90,90,180,90,
						  270,270,180,90,270,270,90,90,180,
						  90,0,90,270,270,0,0,90,90,
						  270,180,0,270,180,0,0,270,180,
						  90,0,90,180,270,0,90,90,270,
						  90,180,0,270,0,90,90,270
						  );
				  
	}
	private void setSettingsLevelPack2(){
		SharedPreferences settings = getSharedPreferences("levelsInDB", Context.MODE_PRIVATE);
    	Editor editor = settings.edit();
    	editor.putBoolean("LevelsInDatabaseLevelPack2", true);
    	editor.commit();
	}
	
	
	private void addLevelsPack3Part1() {
		db.addLevel(3,"3x1","plaatje",//levelpack,level,plaatje
                //de buizen
 15,1,5,5,2,5,1,0,
 1,2,3,1,5,1,2,16,
 2,2,2,2,1,5,1,1,
 1,1,5,1,2,6,1,5,
 4,4,2,6,1,5,1,2,
 2,1,5,1,1,2,1,4,
 1,2,6,1,2,2,1,15,
 1,2,2,1,2,3,2,1,
 2,6,6,1,1,5,2,5,
 4,1,1,1,5,5,2,1,
                              
 //rotate van buizen:
 270,90,180,90,270,0,180,180,0,
 180,0,180,90,90,270,0,0,180,
 90,0,90,0,90,90,0,0,90,
 180,90,0,180,0,90,90,90,90,
 180,0,270,180,180,270,0,0,0,
 0,0,90,180,180,180,0,180,0,
 180,270,90,270,90,180,0,0,270,
 90,180,90,180,0,90,180,270,270,
 180,0,270,270,0,0,90,270
 );

 db.addLevel(3,"3x2","plaatje",//levelpack,level,plaatje
                //de buizen
 3,1,1,3,5,1,1,1,
 1,6,2,1,1,2,1,5,
 1,1,15,1,2,1,1,4,
 1,1,1,2,1,2,6,1,
 1,2,1,3,1,1,2,2,
 1,2,5,2,1,1,1,5,
 4,1,1,1,1,1,2,1,
 1,5,2,1,2,1,1,16,
 1,2,2,1,5,1,2,1,
 1,1,15,0,1,5,1,4,
                              
 //rotate van buizen:
 180,180,180,0,180,0,90,0,270,
 0,270,180,90,180,90,90,180,180,
 180,0,180,180,180,0,0,270,90,
 0,270,270,90,90,90,0,90,0,
 0,180,0,270,270,0,180,0,270,
 270,180,90,180,0,180,0,270,90,
 90,270,0,180,0,270,90,90,0,
 270,90,180,270,90,90,0,90,0,
 90,270,90,0,270,0,90,90
 );

 db.addLevel(3,"3x3","plaatje",//levelpack,level,plaatje
                //de buizen
 1,2,1,1,5,2,1,15,
 1,2,3,2,1,1,6,1,
 4,1,2,1,1,2,2,5,
 1,2,1,15,3,1,1,2,
 1,2,0,1,2,1,1,1,
 1,2,5,2,5,1,2,4,
 15,3,1,1,1,1,1,1,
 4,1,6,1,1,6,5,4,
 2,2,1,2,1,2,2,1,
 1,2,5,2,5,1,1,1,         
                  
 //rotate van buizen:
 270,0,90,0,180,90,90,270,90,
 90,90,270,270,180,90,0,90,0,
 270,0,270,270,0,0,90,180,180,
 0,180,180,90,180,180,270,270,0,
 0,0,270,180,90,90,180,0,270,
 270,0,90,270,0,180,270,0,180,
 270,90,0,180,180,270,0,0,90,
 180,270,90,180,0,90,180,270,270,
 270,90,0,270,0,90,0,0
 );

 db.addLevel(3,"3x4","plaatje",//levelpack,level,plaatje
                //de buizen
 1,1,1,1,1,1,1,4,
 3,2,2,4,2,6,2,1,
 1,1,1,1,1,2,1,5,
 1,1,1,2,1,3,1,2,
 15,2,1,1,2,1,1,1,
 4,1,1,1,1,1,1,16,
 2,1,1,2,1,5,2,1,
 5,1,2,1,1,1,1,1,
 1,2,1,1,2,2,2,1,
 0,1,5,1,4,1,2,1,         

 //rotate van buizen:
 0,90,270,180,270,270,270,0,180,
 0,180,0,180,0,90,270,270,270,
 180,0,90,0,0,270,0,90,180,
 270,90,270,0,180,0,0,0,0,
 0,0,90,180,0,0,270,270,0,
 0,270,270,0,90,0,90,180,0,
 90,180,180,270,180,0,180,270,180,
 270,270,180,0,0,270,90,270,0,
 90,180,270,180,270,180,180,270
 );

 db.addLevel(3,"3x5","plaatje",//levelpack,level,plaatje
                //de buizen
 1,2,1,1,5,2,5,1,
 2,1,1,6,1,1,1,4,
 3,1,2,1,2,1,1,1,
 1,2,2,4,5,1,1,5,
 1,1,5,1,2,1,1,2,
 1,1,1,1,1,1,1,1,
 1,2,5,6,1,1,6,4,
 4,1,2,2,1,2,1,15,
 2,1,2,1,1,6,2,1,
 4,1,1,1,5,1,1,1,

 //rotate van buizen:
 180,180,180,270,0,0,270,0,90,
 0,90,180,0,270,180,270,90,90,
 90,90,180,270,0,90,90,270,270,
 270,0,270,270,270,90,90,180,180,
 180,180,180,0,180,270,180,270,180,
 90,270,0,180,90,90,90,0,90,
 180,90,0,90,90,90,0,0,90,
 180,180,270,90,0,180,270,0,90,
 270,180,0,90,0,270,90,180
 );

 db.addLevel(3,"3x6","plaatje",//levelpack,level,plaatje
                //de buizen
 1,4,1,5,1,1,5,1,
 1,2,2,1,2,2,2,1,
 1,1,2,1,4,3,2,4,
 1,1,1,1,5,1,1,5,
 1,6,1,3,1,1,1,2,
 5,2,2,0,1,1,2,1,
 1,6,1,3,5,1,2,1,
 15,1,1,1,2,0,1,2,
 4,1,6,5,2,1,1,5,
 1,1,1,5,2,1,16,4,

 //rotate van buizen:
 180,180,0,0,0,180,0,180,270,
 270,0,270,180,90,270,0,0,180,
 180,270,180,270,90,90,90,180,270,
 270,270,0,270,180,180,270,180,270,
 180,270,90,90,270,180,90,90,270,
 90,180,0,0,0,0,180,270,90,
 270,0,0,270,0,270,270,270,180,
 180,270,90,90,180,0,270,270,270,
 90,90,90,0,270,270,90,270
 );

 db.addLevel(3,"3x7","plaatje",//levelpack,level,plaatje
                //de buizen
 1,5,1,4,5,1,1,4,
 2,3,2,1,1,1,1,1,
 5,1,1,1,2,5,1,5,
 2,1,1,1,0,3,1,1,
 1,2,2,5,1,1,1,1,
 4,3,5,1,6,5,1,5,
 5,1,2,15,1,1,1,2,
 1,2,1,2,2,1,1,1,
 1,2,1,2,6,2,3,4,
 1,4,1,1,1,2,5,1,

 //rotate van buizen:
 270,270,180,90,0,270,0,0,180,
 90,180,270,270,90,0,180,0,180,
 180,270,270,0,90,90,0,270,0,
 180,270,270,180,180,270,0,270,270,
 0,0,0,180,90,270,90,0,0,
 180,180,90,90,90,90,0,90,180,
 180,90,90,180,0,90,180,270,0,
 90,270,270,90,270,270,180,180,90,
 90,0,90,180,180,0,0,270
 );

 db.addLevel(3,"3x8","plaatje",//levelpack,level,plaatje
                //de buizen
 3,1,4,1,1,4,5,1,
 4,1,6,1,1,1,3,5,
 2,1,1,1,0,1,1,5,
 5,1,3,1,1,0,1,1,
 1,1,3,1,1,1,1,1,
 1,2,4,5,0,4,1,1,
 1,1,4,1,1,1,1,0,
 4,1,2,1,1,1,0,4,
 2,1,1,1,1,1,1,1,
 4,1,2,5,1,1,1,0,

 //rotate van buizen:
 180,0,270,90,90,90,180,270,90,
 0,180,0,0,270,90,90,90,180,
 90,270,270,180,90,180,180,180,0,
 0,0,270,270,180,270,270,0,90,
 90,180,0,270,270,270,270,270,270,
 90,0,0,0,180,0,270,90,90,
 180,270,0,180,0,0,180,0,270,
 180,270,270,270,90,180,0,0,180,
 0,0,90,270,180,180,0,180
 );

 db.addLevel(3,"3x9","plaatje",//levelpack,level,plaatje
                //de buizen
 1,1,1,1,1,2,1,0,
 5,5,5,1,1,3,1,1,
 5,5,1,1,1,1,1,1,
 5,1,5,1,5,1,1,4,
 1,1,1,1,1,5,1,5,
 4,1,1,5,1,1,1,1,
 5,1,1,5,5,1,1,0,
 5,5,5,5,4,1,1,0,
 1,1,5,5,1,1,0,0,
 0,0,1,2,1,0,0,0,

 //rotate van buizen:
 90,180,0,270,270,270,90,0,180,
 180,90,90,180,0,270,180,90,0,
 0,0,270,180,90,180,0,90,270,
 90,90,180,180,270,90,270,270,0,
 270,0,0,180,180,90,270,90,180,
 180,0,0,270,0,90,270,270,180,
 180,270,0,90,0,90,0,270,0,
 90,270,270,180,180,270,180,90,180,
 0,0,270,270,270,270,0,270
 );

 db.addLevel(3,"3x10","plaatje",//levelpack,level,plaatje
                //de buizen
 0,0,1,3,0,1,5,1,
 0,1,1,0,0,1,1,5,
 1,1,0,1,1,1,1,5,
 1,1,1,1,1,1,1,1,
 0,5,1,1,4,2,1,4,
 1,1,0,3,0,1,5,1,
 1,5,1,4,1,5,5,1,
 4,1,2,1,1,4,1,1,
 5,1,1,0,0,3,1,1,
 1,5,1,0,0,1,5,1,

 //rotate van buizen:
 270,270,180,180,270,180,270,90,90,
 180,270,0,0,90,270,180,270,180,
 180,0,180,180,0,90,0,270,90,
 270,180,90,180,90,90,90,270,90,
 270,180,180,90,90,180,90,90,0,
 0,0,270,180,180,0,90,90,0,
 180,180,0,0,90,180,180,270,270,
 0,0,270,90,0,180,0,90,270,
 270,270,90,270,270,90,180,180
 );

 db.addLevel(3,"3x11","plaatje",//levelpack,level,plaatje
                //de buizen
 1,5,5,1,1,1,1,4,
 5,1,1,1,1,5,1,1,
 5,5,1,3,4,2,1,1,
 5,1,1,1,1,1,1,3,
 1,3,1,1,1,1,4,5,
 0,1,4,0,1,1,2,1,
 1,1,1,1,5,1,1,4,
 1,1,5,1,1,1,1,5,
 0,5,1,1,1,1,1,2,
 0,1,5,1,4,1,5,1,

 //rotate van buizen:
 0,180,90,0,180,0,180,0,270,
 0,180,180,0,0,0,180,90,90,
 90,0,180,0,90,180,90,90,270,
 0,0,270,180,90,180,0,180,0,
 90,0,90,0,90,270,180,90,270,
 270,0,90,0,180,90,270,180,270,
 180,270,90,180,0,180,90,180,270,
 0,270,90,0,0,180,90,0,0,
 90,270,90,0,270,180,90,270
 );

 db.addLevel(3,"3x12","plaatje",//levelpack,level,plaatje
                //de buizen
 1,2,1,1,2,5,2,1,
 2,1,2,1,1,2,2,2,
 2,1,2,2,1,2,2,2,
 2,2,2,5,1,1,1,2,
 5,1,2,3,4,1,2,1,
 2,1,1,1,5,2,2,1,
 2,1,1,6,2,2,1,2,
 2,2,1,1,1,1,2,5,
 2,2,1,1,1,1,6,2,
 1,1,1,2,5,2,2,1,

 //rotate van buizen:
 90,90,0,270,90,270,90,90,180,
 0,0,0,0,90,270,0,90,180,
 90,270,90,90,90,0,0,180,90,
 180,90,270,270,270,0,0,180,180,
 270,0,0,180,0,90,180,90,180,
 90,90,270,270,180,270,90,0,0,
 180,0,270,0,270,90,270,270,0,
 0,270,180,180,270,270,180,90,270,
 0,270,90,180,90,180,180,90
 );

 db.addLevel(3,"3x13","plaatje",//levelpack,level,plaatje
                //de buizen
 0,1,2,4,1,5,5,1,
 1,1,3,1,1,1,1,4,
 1,4,1,1,1,1,1,1,
 1,5,1,1,1,3,1,5,
 5,1,1,1,1,1,1,5,
 5,5,1,3,1,1,1,1,
 1,1,1,1,1,2,2,1,
 1,1,5,1,1,4,1,1,
 5,1,2,1,4,1,2,1,
 1,5,4,1,2,2,4,4,

 //rotate van buizen:
 180,90,90,270,90,90,180,0,270,
 270,270,180,90,0,270,180,0,180,
 180,180,0,270,270,270,270,0,270,
 180,90,270,0,0,0,180,0,180,
 270,180,180,270,180,180,90,270,180,
 90,180,180,270,90,0,0,0,270,
 270,0,0,270,270,90,180,0,180,
 270,180,180,90,180,90,270,180,270,
 180,270,270,0,0,180,270,0
 );

 db.addLevel(3,"3x14","plaatje",//levelpack,level,plaatje
                //de buizen
 0,1,4,1,5,5,2,1,
 4,2,2,1,1,3,4,5,
 1,1,1,1,1,1,4,2,
 1,5,1,1,4,1,1,5,
 2,2,2,1,0,1,1,3,
 4,1,2,2,4,1,1,4,
 0,0,1,2,5,4,1,2,
 1,4,3,1,1,1,1,1,
 2,1,1,1,5,1,1,0,
 4,1,1,1,2,4,0,0,

 //rotate van buizen:
 180,180,0,180,270,270,270,270,270,
 180,0,270,270,270,0,90,270,270,
 270,90,90,90,270,270,90,270,90,
 0,270,180,180,90,90,180,270,0,
 180,270,0,90,90,0,0,90,270,
 0,180,270,0,90,0,180,270,0,
 90,0,270,270,0,270,180,270,90,
 270,90,90,270,270,0,270,90,90,
 0,90,180,270,180,90,180,180
 );

 db.addLevel(3,"3x15","plaatje",//levelpack,level,plaatje
                //de buizen
 1,1,3,3,3,3,3,4,
 5,1,1,5,2,2,1,1,
 1,1,1,2,5,5,1,1,
 4,2,1,1,2,1,1,5,
 4,1,1,1,6,1,1,1,
 2,2,1,2,2,2,2,1,
 1,2,0,1,2,0,1,1,
 0,1,2,1,1,1,1,1,
 0,0,1,2,1,1,1,1,
 0,0,0,4,4,4,1,0,

 //rotate van buizen:
 270,180,90,270,270,270,270,180,180,
 180,0,0,180,180,180,90,270,270,
 180,0,180,270,0,180,180,270,180,
 180,90,270,90,0,90,270,0,0,
 180,0,270,90,180,270,90,0,180,
 0,180,180,0,0,180,180,0,180,
 0,180,180,270,0,270,270,180,0,
 0,90,0,90,0,0,90,90,270,
 90,270,270,270,270,90,90,270
 );

 db.addLevel(3,"3x16","plaatje",//levelpack,level,plaatje
                //de buizen
 4,1,1,5,2,4,1,4,
 1,1,2,1,1,1,1,1,
 1,1,3,1,1,1,2,1,
 1,2,5,1,1,1,3,0,
 1,1,4,1,4,1,1,0,
 1,1,5,1,1,1,1,0,
 1,1,2,1,1,1,1,1,
 4,1,1,0,4,0,3,5,
 1,1,1,1,2,1,1,1,
 0,1,1,1,1,1,1,0,

 //rotate van buizen:
 0,270,270,180,180,180,180,180,90,
 90,270,90,180,0,0,0,270,90,
 90,90,270,90,180,270,180,90,180,
 270,180,0,90,180,0,90,90,180,
 270,0,0,0,90,0,180,270,90,
 180,0,0,270,180,90,270,0,0,
 180,180,90,90,180,0,90,0,180,
 180,90,0,0,0,0,90,90,180,
 180,270,180,270,180,180,270,180
 );

 db.addLevel(3,"3x17","plaatje",//levelpack,level,plaatje
                //de buizen
 4,5,1,1,1,4,5,1,
 1,5,1,3,1,1,1,1,
 1,1,1,1,1,2,1,4,
 0,1,1,1,1,3,1,1,
 1,5,4,1,2,1,1,3,
 1,1,1,1,1,1,1,3,
 1,1,1,1,1,1,1,1,
 1,1,1,1,1,1,1,1,
 4,2,2,1,4,1,1,0,
 1,2,4,1,1,0,0,0,

 //rotate van buizen:
 270,270,0,90,0,180,90,0,180,
 90,270,0,180,0,270,270,0,90,
 270,180,270,0,180,90,270,270,90,
 90,0,90,0,270,90,0,90,90,
 270,270,180,180,0,90,270,270,180,
 180,270,180,0,180,0,270,270,270,
 0,180,180,90,0,270,270,90,270,
 0,90,0,180,90,270,90,270,0,
 180,270,0,90,90,270,270,90
 );

 db.addLevel(3,"3x18","plaatje",//levelpack,level,plaatje
                //de buizen
 1,1,1,1,1,5,1,0,
 4,2,2,1,2,2,2,0,
 4,5,1,5,2,2,2,1,
 5,2,5,2,2,2,2,1,
 1,1,1,1,0,2,2,0,
 1,3,1,1,3,1,2,1,
 1,1,0,1,1,0,1,1,
 0,1,1,3,0,1,1,0,
 4,1,2,2,0,1,1,0,
 0,1,1,1,4,0,4,0,

 //rotate van buizen
 0,0,270,180,90,180,270,270,0,
 180,0,270,270,90,180,180,180,90,
 270,180,0,180,90,180,180,0,0,
 180,0,180,270,0,270,270,270,90,
 90,180,0,180,90,0,90,0,180,
 270,270,0,90,180,270,90,90,0,
 0,270,0,90,180,90,270,90,180,
 180,0,90,270,180,0,0,0,90,
 90,180,180,270,90,90,270,270
 );

 db.addLevel(3,"3x19","plaatje",//levelpack,level,plaatje
                //de buizen
 1,1,0,1,1,4,1,4,
 5,1,1,3,1,1,1,2,
 1,1,1,1,1,1,1,1,
 3,1,1,1,1,1,2,4,
 1,1,1,1,1,1,1,2,
 4,1,1,1,1,1,1,4,
 5,1,1,1,2,1,1,1,
 1,1,1,1,5,4,1,1,
 1,1,1,1,3,1,1,4,
 4,1,5,2,5,5,5,1,

 //rotate van buizen:
 180,90,270,0,90,0,90,180,0,
 180,0,180,0,90,180,180,180,270,
 270,90,180,270,0,180,90,270,90,
 180,0,180,90,270,0,90,270,90,
 180,90,0,180,0,0,90,0,90,
 270,270,270,270,180,0,90,180,90,
 270,0,0,90,180,0,0,0,0,
 0,180,0,180,0,180,270,270,180,
 270,90,180,90,0,180,90,270
 );

 db.addLevel(3,"3x20","plaatje",//levelpack,level,plaatje
                //de buizen
 0,1,5,5,5,1,0,0,
 1,1,0,1,1,1,1,0,
 1,1,1,1,1,1,1,1,
 1,1,3,1,1,1,1,4,
 3,1,1,3,1,1,1,1,
 4,1,1,1,1,1,1,1,
 0,4,3,1,1,1,6,1,
 1,1,1,1,1,1,2,1,
 1,1,1,1,1,5,2,1,
 0,1,1,3,5,4,4,1,

 //rotate van buizen:
 90,0,270,270,90,180,0,90,0,
 90,270,180,180,270,270,90,90,180,
 0,0,180,180,270,90,270,0,90,
 180,270,0,0,90,90,0,0,180,
 180,0,0,180,90,270,90,0,270,
 0,90,0,270,90,90,180,0,0,
 270,270,0,90,180,270,180,180,90,
 270,180,90,180,90,180,180,0,0,
 180,90,0,180,90,90,180,0
 );
	}
	
	
	private void addLevelsPack3Part2() {
	
 db.addLevel(3,"3x21","plaatje",//levelpack,level,plaatje
         //de buizen
		 15,1,1,4,1,2,5,1,
		 1,1,1,2,5,1,1,5,
		 5,3,1,1,2,2,1,5,
		 2,2,2,2,2,1,4,2,
		 1,1,4,1,6,5,2,1,
		 1,5,6,1,1,2,6,1,
		 1,1,1,2,1,1,1,1,
		 4,1,1,1,1,1,5,4,
		 2,2,2,1,1,2,1,1,
		 1,1,16,1,1,1,1,4,

//rotate van buizen:
		 0,0,180,270,0,180,180,0,270,
		 0,0,90,270,180,90,270,270,90,
		 180,270,90,180,90,180,90,0,90,
		 270,90,0,90,90,90,0,90,90,
		 270,270,180,180,0,180,270,0,0,
		 0,270,0,180,90,0,0,270,90,
		 270,90,90,90,0,270,180,180,90,
		 270,270,180,0,180,90,270,0,90,
		 90,270,180,180,0,90,270,270
);
 
 db.addLevel(3,"3x22","plaatje",//levelpack,level,plaatje
         //de buizen
		 1,1,1,4,1,2,1,15,
		 2,2,1,1,1,5,2,1,
		 1,1,1,2,4,1,2,1,
		 4,1,1,2,1,1,6,1,
		 1,1,1,1,3,1,1,5,
		 0,1,1,1,5,1,1,1,
		 1,4,1,2,1,1,1,4,
		 5,1,1,4,6,2,1,5,
		 5,3,1,1,2,2,2,1,
		 1,5,1,1,2,5,4,0,

//rotate van buizen:
		 0,180,270,180,0,180,90,90,90,
		 0,180,0,90,180,0,0,270,90,
		 270,180,180,0,270,90,90,90,0,
		 180,90,270,0,180,180,0,0,180,
		 180,90,270,270,180,180,0,270,0,
		 0,0,270,90,270,180,0,0,90,
		 90,180,180,180,90,0,180,90,180,
		 0,180,270,180,0,90,180,0,270,
		 0,0,270,0,0,270,0,180
);
 
 db.addLevel(3,"3x23","plaatje",//levelpack,level,plaatje
         //de buizen
		 4,1,5,3,1,5,1,4,
		 2,1,1,4,2,1,1,2,
		 5,1,1,3,1,2,1,4,
		 5,1,1,1,1,1,1,3,
		 1,1,1,1,1,1,1,1,
		 4,2,1,2,1,1,1,1,
		 1,1,5,2,2,1,5,1,
		 1,2,2,2,2,1,4,4,
		 1,6,2,1,1,1,1,2,
		 1,2,1,1,5,5,1,4,

//rotate van buizen:
		 90,270,270,180,270,180,90,180,270,
		 180,90,180,270,0,90,180,90,270,
		 180,90,90,0,180,270,0,90,0,
		 270,0,180,180,180,90,180,0,90,
		 0,180,0,0,0,90,270,270,180,
		 0,180,270,0,0,90,90,90,270,
		 90,90,90,90,90,90,0,270,0,
		 90,180,0,270,180,180,270,270,270,
		 90,270,270,270,270,90,270,0
);
 
 db.addLevel(3,"3x24","plaatje",//levelpack,level,plaatje
         //de buizen
		 0,0,1,1,1,1,1,1,
		 0,1,1,2,1,2,2,4,
		 1,1,1,1,1,1,1,1,
		 1,1,1,3,4,1,1,4,
		 0,1,1,3,5,1,1,1,
		 4,1,1,3,1,1,2,1,
		 5,1,2,2,1,1,6,1,
		 1,1,2,1,1,1,2,1,
		 0,2,1,1,1,1,1,3,
		 4,2,4,1,4,4,5,1,

//rotate van buizen:
		 180,0,0,270,180,270,0,0,90,
		 0,90,90,90,0,0,180,0,180,
		 270,0,180,0,0,180,180,90,0,
		 180,0,180,270,180,180,0,90,90,
		 270,180,90,90,270,180,180,0,270,
		 270,270,270,90,180,0,0,270,90,
		 180,90,270,270,270,270,90,270,90,
		 270,270,270,0,270,180,180,0,90,
		 90,270,90,0,270,90,0,90
);
 
 db.addLevel(3,"3x25","plaatje",//levelpack,level,plaatje
         //de buizen
		 1,5,4,1,1,4,1,4,
		 1,1,1,1,1,1,1,2,
		 0,1,2,5,4,1,1,5,
		 0,1,1,1,1,1,1,5,
		 1,1,1,1,1,1,1,1,
		 2,2,1,4,5,2,1,4,
		 2,1,1,2,2,1,4,2,
		 1,3,3,1,2,4,1,5,
		 4,1,1,4,3,1,2,5,
		 1,2,5,2,5,1,1,1,

//rotate van buizen:
		 180,0,0,90,180,270,0,270,180,
		 90,0,180,90,180,90,90,90,180,
		 0,180,180,180,0,90,270,180,270,
		 180,180,270,90,90,0,90,270,180,
		 90,270,180,0,90,270,180,180,180,
		 0,0,0,180,0,180,90,180,270,
		 180,180,90,90,0,0,90,180,180,
		 90,0,90,0,90,90,270,90,180,
		 180,0,90,90,90,90,90,0
);
 
 db.addLevel(3,"3x26","plaatje",//levelpack,level,plaatje
         //de buizen
		 4,1,4,1,1,1,5,1,
		 5,1,1,5,1,6,2,1,
		 1,1,1,2,4,2,2,4,
		 3,2,2,2,6,2,1,1,
		 5,1,1,1,2,2,1,4,
		 1,1,4,3,1,1,1,1,
		 1,2,2,4,1,5,5,1,
		 1,1,1,1,1,1,1,1,
		 3,1,1,1,2,1,1,1,
		 1,5,4,4,2,4,4,1,

//rotate van buizen:
		 0,270,180,90,180,90,0,270,90,
		 270,270,270,180,90,270,270,270,270,
		 0,180,270,0,90,180,90,0,0,
		 0,90,270,90,90,270,270,180,90,
		 90,180,90,180,180,90,180,0,180,
		 180,0,90,90,0,0,90,0,90,
		 270,180,90,0,270,180,270,90,0,
		 180,0,180,0,90,90,180,0,270,
		 270,270,0,90,90,0,270,180
);

 db.addLevel(3,"3x27","plaatje",//levelpack,level,plaatje
         //de buizen
		 4,1,5,2,2,5,1,4,
		 2,1,4,2,2,4,1,2,
		 1,2,2,2,2,2,2,1,
		 1,1,1,2,2,1,1,1,
		 1,1,3,2,2,3,1,1,
		 1,1,1,2,2,1,2,1,
		 4,1,2,2,2,2,2,4,
		 1,1,1,2,2,1,1,1,
		 2,1,1,2,2,2,1,1,
		 4,1,5,2,1,1,1,0,

//rotate van buizen:
		 0,180,90,0,0,0,0,90,90,
		 180,90,180,90,90,90,0,90,90,
		 270,90,90,180,90,180,0,0,0,
		 270,90,270,270,180,180,0,180,270,
		 90,270,90,180,90,180,0,180,270,
		 180,180,90,270,180,270,0,0,0,
		 270,90,90,270,0,180,270,0,0,
		 90,0,270,0,90,180,90,270,270,
		 270,0,180,270,180,0,90,90
);
 
 db.addLevel(3,"3x28","plaatje",//levelpack,level,plaatje
         //de buizen
		 4,2,5,5,1,1,1,4,
		 1,2,2,1,1,1,1,2,
		 1,1,3,1,1,4,2,1,
		 4,1,1,1,1,1,2,1,
		 2,1,1,1,1,1,1,1,
		 4,1,1,1,2,4,4,0,
		 1,5,2,6,4,1,1,0,
		 1,5,5,2,5,1,1,1,
		 1,5,1,1,1,1,1,5,
		 1,3,1,1,1,1,1,1,

//rotate van buizen:
		 0,0,180,180,90,90,0,0,270,
		 0,270,180,270,0,90,270,180,180,
		 180,270,90,0,0,90,0,90,270,
		 0,0,180,270,90,270,90,270,0,
		 270,270,90,270,0,90,90,0,90,
		 270,0,0,90,180,0,180,270,0,
		 0,0,180,0,0,180,270,0,270,
		 180,90,270,270,90,180,90,0,270,
		 180,180,270,0,90,270,90,270
);
 
 db.addLevel(3,"3x29","plaatje",//levelpack,level,plaatje
         //de buizen
		 3,1,1,1,4,1,2,4,
		 2,1,1,2,2,1,1,1,
		 2,1,1,1,1,1,3,1,
		 5,1,2,2,1,1,1,4,
		 1,1,1,2,1,4,1,1,
		 1,1,1,1,1,6,1,4,
		 1,1,1,1,5,5,1,1,
		 3,1,1,1,1,1,1,4,
		 1,1,1,1,1,1,1,1,
		 0,1,1,1,1,1,5,4,

//rotate van buizen:
		 90,0,270,90,180,270,90,180,180,
		 90,0,270,90,270,90,180,180,180,
		 270,90,0,90,180,90,0,270,90,
		 0,270,90,180,0,90,90,180,0,
		 90,270,180,0,90,180,270,180,180,
		 0,0,0,270,0,90,270,180,270,
		 90,180,270,180,180,180,270,90,270,
		 90,270,180,90,0,90,0,0,180,
		 180,270,90,90,0,180,90,0
);
 
 db.addLevel(3,"3x30","plaatje",//levelpack,level,plaatje
         //de buizen
		 1,4,1,5,2,1,4,1,
		 1,1,2,2,1,1,1,5,
		 3,2,1,3,4,1,1,5,
		 1,1,3,1,6,1,1,1,
		 1,1,1,2,1,5,1,4,
		 5,2,1,1,1,4,2,1,
		 1,2,2,4,1,1,1,1,
		 1,1,1,1,1,1,1,2,
		 1,1,4,1,1,1,1,5,
		 0,1,2,5,5,1,4,1,

//rotate van buizen:
		 90,270,270,180,270,0,0,0,270,
		 0,180,180,180,0,270,270,0,180,
		 270,270,180,0,270,270,180,90,90,
		 270,270,180,0,0,90,0,180,90,
		 0,270,180,0,270,90,270,90,90,
		 270,90,180,90,90,90,0,180,90,
		 270,0,270,90,270,180,0,0,270,
		 180,0,180,270,90,90,180,90,0,
		 270,90,180,90,0,270,270,180
);
 
 db.addLevel(3,"3x31","plaatje",//levelpack,level,plaatje
         //de buizen
		 3,1,4,5,2,4,0,3,
		 0,1,1,1,1,4,1,1,
		 1,4,1,6,4,2,1,0,
		 5,1,1,2,2,1,4,1,
		 1,1,2,1,1,1,1,1,
		 0,1,2,4,4,2,2,0,
		 1,2,1,1,1,4,1,1,
		 1,1,1,6,2,1,1,1,
		 0,1,1,5,4,1,1,0,
		 0,0,4,4,1,1,0,0,

//rotate van buizen:
		 0,90,0,180,270,90,270,90,0,
		 270,0,90,270,270,90,180,270,90,
		 180,0,180,270,0,90,180,180,180,
		 90,0,180,0,0,270,0,270,180,
		 180,180,0,180,90,90,270,90,0,
		 90,270,270,270,90,0,180,90,0,
		 270,270,270,180,90,270,0,90,0,
		 270,180,270,180,0,180,180,180,270,
		 270,180,0,0,0,0,0,270
);
 
 db.addLevel(3,"3x32","plaatje",//levelpack,level,plaatje
         //de buizen
		 1,4,1,1,1,5,1,4,
		 5,1,1,4,1,1,1,1,
		 5,1,2,1,1,2,1,1,
		 1,1,3,1,2,2,1,5,
		 3,1,1,1,2,1,1,1,
		 1,1,1,1,1,1,1,1,
		 1,2,4,1,1,1,5,1,
		 1,1,4,4,4,4,2,1,
		 4,1,2,1,2,1,1,5,
		 1,5,2,1,1,1,4,1,

//rotate van buizen:
		 90,180,0,180,0,90,180,180,180,
		 180,180,270,90,90,270,270,270,0,
		 0,0,270,180,90,270,180,0,270,
		 90,0,270,90,180,90,180,90,180,
		 270,0,0,180,180,270,90,0,0,
		 90,0,0,90,0,90,0,180,180,
		 0,90,180,270,270,270,270,0,90,
		 0,180,270,180,180,270,270,0,180,
		 180,180,270,270,270,270,270,90
);

 db.addLevel(3,"3x33","plaatje",//levelpack,level,plaatje
         //de buizen
		 0,1,1,1,2,1,4,1,
		 1,1,2,1,3,1,1,5,
		 1,1,1,1,4,1,1,5,
		 3,1,1,1,2,2,1,5,
		 1,2,2,1,1,4,1,1,
		 1,1,1,1,1,2,1,1,
		 1,1,1,1,4,1,1,5,
		 3,1,1,1,1,3,1,1,
		 1,1,1,1,4,1,1,4,
		 0,1,1,1,2,5,5,1,

//rotate van buizen:
		 180,90,180,270,270,0,90,270,0,
		 180,180,0,270,270,0,180,0,0,
		 0,270,0,180,90,90,180,180,270,
		 90,90,0,270,270,180,180,270,180,
		 180,0,180,270,180,90,0,180,0,
		 0,90,90,90,90,0,90,270,180,
		 270,180,0,270,0,90,270,0,90,
		 180,180,0,90,90,90,270,0,270,
		 0,0,180,0,90,270,180,180
);
 
 db.addLevel(3,"3x34","plaatje",//levelpack,level,plaatje
         //de buizen
		 3,1,5,5,5,1,4,1,
		 5,1,1,1,1,1,1,5,
		 1,1,1,1,3,4,1,1,
		 4,1,1,1,1,5,3,1,
		 2,1,1,1,1,1,1,1,
		 5,1,1,1,1,1,2,4,
		 1,1,1,1,1,1,1,4,
		 4,1,1,1,1,1,1,3,
		 2,1,1,1,1,1,1,1,
		 3,1,5,5,5,5,2,4,

//rotate van buizen:
		 270,270,90,180,90,270,270,180,90,
		 0,90,270,180,180,270,270,180,0,
		 270,180,90,0,180,270,180,90,90,
		 270,90,270,270,0,270,0,270,90,
		 0,180,270,90,270,90,0,90,270,
		 0,90,90,0,0,0,180,0,180,
		 90,270,270,270,180,0,270,180,0,
		 270,270,270,0,270,180,0,0,90,
		 90,0,270,0,90,0,90,90
);
 
 db.addLevel(3,"3x35","plaatje",//levelpack,level,plaatje
         //de buizen
		 4,1,1,2,1,1,1,4,
		 4,2,1,3,1,2,2,1,
		 2,1,4,2,1,1,1,3,
		 1,1,1,1,1,1,5,5,
		 4,1,1,3,4,2,1,5,
		 2,1,1,2,4,1,1,1,
		 5,1,1,5,3,1,1,4,
		 1,1,1,1,1,2,5,1,
		 3,1,1,4,5,5,5,1,
		 1,5,5,5,5,5,5,1,

//rotate van buizen:
		 180,270,270,270,270,90,180,0,0,
		 90,0,270,90,90,0,180,180,0,
		 270,180,90,90,180,90,270,90,0,
		 180,270,270,90,180,180,0,90,180,
		 90,0,180,180,90,270,90,180,0,
		 180,90,270,270,0,180,0,180,0,
		 180,180,180,270,0,180,180,90,0,
		 90,180,180,0,270,180,180,90,270,
		 90,270,180,180,180,0,180,90
);
 
 db.addLevel(3,"3x36","plaatje",//levelpack,level,plaatje
         //de buizen
		 4,1,3,1,1,1,4,1,
		 1,2,2,2,1,1,1,5,
		 5,1,2,1,1,1,1,5,
		 2,1,1,1,3,1,2,2,
		 1,1,4,1,1,5,2,1,
		 1,1,1,2,1,2,5,4,
		 2,4,2,2,1,1,1,1,
		 1,1,2,6,2,1,5,5,
		 4,1,2,2,2,2,1,5,
		 1,5,2,1,1,5,5,1,

//rotate van buizen:
		 270,270,0,270,270,270,0,0,180,
		 270,0,0,0,180,270,180,0,0,
		 90,180,270,90,90,180,270,0,270,
		 270,90,90,0,90,0,0,90,0,
		 0,90,0,270,90,90,270,90,270,
		 180,0,270,180,90,180,180,270,270,
		 0,270,270,0,180,90,180,270,180,
		 270,270,270,270,0,0,270,270,90,
		 90,180,270,0,90,270,0,0
);
 
 db.addLevel(3,"3x37","plaatje",//levelpack,level,plaatje
         //de buizen
		 1,1,4,1,5,5,5,1,
		 5,3,3,3,3,1,2,2,
		 1,2,1,1,1,1,2,2,
		 1,2,1,1,1,5,5,1,
		 1,2,5,5,2,1,1,1,
		 1,5,1,1,2,2,2,5,
		 2,2,2,1,4,1,1,5,
		 4,2,2,5,2,2,1,5,
		 1,2,5,4,4,4,4,5,
		 1,1,1,1,0,1,5,1,

//rotate van buizen:
		 270,270,180,180,180,270,270,180,180,
		 180,270,180,0,180,0,0,270,180,
		 270,0,0,90,270,90,90,90,180,
		 90,180,180,180,90,180,90,0,90,
		 0,270,270,270,90,270,180,90,180,
		 270,90,90,90,90,180,90,180,90,
		 270,0,270,180,90,90,90,0,180,
		 270,90,180,90,180,180,90,180,270,
		 90,0,90,270,270,270,90,90
);
 
 db.addLevel(3,"3x38","plaatje",//levelpack,level,plaatje
         //de buizen
		 1,5,2,4,1,5,2,1,
		 5,1,1,1,1,1,1,5,
		 5,1,1,1,4,2,1,5,
		 2,4,1,2,1,2,2,2,
		 1,1,4,3,1,1,1,1,
		 4,1,1,1,4,1,2,1,
		 2,5,1,2,1,2,5,1,
		 1,1,1,1,1,2,1,4,
		 4,1,1,1,1,4,1,1,
		 1,5,2,1,1,1,3,4,

//rotate van buizen:
		 180,180,0,270,90,90,0,270,0,
		 180,90,270,180,180,180,270,180,90,
		 90,0,0,180,180,90,180,270,0,
		 270,90,180,180,270,90,270,270,180,
		 90,0,90,90,180,270,0,0,180,
		 270,0,0,90,90,0,180,270,270,
		 270,90,180,270,90,0,180,0,270,
		 270,270,180,180,0,180,270,180,90,
		 270,180,90,90,180,180,180,0
);
 
 db.addLevel(3,"3x39","plaatje",//levelpack,level,plaatje
         //de buizen
		 1,2,4,1,4,1,1,4,
		 5,1,2,2,2,1,2,2,
		 2,2,2,2,2,2,2,4,
		 5,1,2,1,4,3,2,1,
		 1,1,2,1,2,1,2,1,
		 4,1,2,1,1,2,2,1,
		 5,3,2,1,4,2,1,4,
		 5,1,1,1,5,2,2,1,
		 1,1,2,1,1,2,5,2,
		 0,0,4,1,1,0,0,4,

//rotate van buizen:
		 90,0,270,180,270,0,270,0,180,
		 270,180,270,0,180,0,0,180,90,
		 180,90,90,90,0,90,180,180,0,
		 0,0,0,180,90,90,180,0,90,
		 180,0,90,0,0,0,270,0,270,
		 0,0,180,90,270,0,180,90,0,
		 270,0,180,0,0,270,90,270,90,
		 180,90,90,270,270,90,90,270,90,
		 90,270,180,90,270,180,270,90
);
 
 db.addLevel(3,"3x40","plaatje",//levelpack,level,plaatje
         //de buizen
		 1,4,1,5,2,5,5,1,
		 5,1,1,1,2,2,1,4,
		 1,2,1,1,1,3,1,1,
		 3,2,2,4,1,1,1,1,
		 1,2,5,5,1,1,1,4,
		 1,1,3,4,1,5,5,1,
		 1,2,1,4,2,5,1,4,
		 1,1,1,1,1,1,1,2,
		 1,2,1,1,1,1,1,1,
		 1,1,1,5,1,4,2,4,

//rotate van buizen:
		 0,90,270,0,0,270,90,270,180,
		 0,0,270,270,90,180,0,180,90,
		 0,180,90,90,90,0,270,270,90,
		 180,180,90,0,270,180,0,270,270,
		 270,90,180,90,90,180,90,90,0,
		 0,90,270,90,180,90,270,270,180,
		 270,270,90,0,180,0,180,180,270,
		 90,180,270,0,180,90,180,0,180,
		 90,180,0,90,180,180,0,270
		 );
		
	
	}
	
	private void setSettingsLevelPack3(){
		SharedPreferences settings = getSharedPreferences("levelsInDB", Context.MODE_PRIVATE);
    	Editor editor = settings.edit();
    	editor.putBoolean("LevelsInDatabaseLevelPack3", true);
    	editor.commit();
	}
	
	private void addExtraLevelsLevelPack1(){
		  db.addLevel(1,"1x41","plaatje",//levelpack,level,plaatje
		          //de buizen
				  1,2,1,1,1,1,1,3,
				  2,2,2,2,2,2,2,1,
				  2,6,2,1,1,2,2,1,
				  2,2,4,2,2,2,2,2,
				  2,2,4,6,2,1,2,2,
				  2,2,9,13,10,7,2,1,
				  1,2,13,2,2,2,14,9,
				  8,11,11,11,14,14,12,11,
				  9,12,9,9,9,10,11,9,
				  9,9,9,10,10,11,11,8,
		          //rotate van buizen: 0, 90, 180, 270
				  180,180,270,0,0,180,0,270,270,
				  90,90,270,0,0,180,0,270,270,
				  270,90,180,0,90,0,180,270,270,
				  270,270,180,90,270,270,0,0,180,
				  90,0,0,180,90,0,270,90,0,
				  90,0,180,270,0,90,90,90,90,
				  180,90,270,180,90,270,180,270,0,
				  180,180,90,270,270,180,90,90,0,
				  90,0,180,270,90,180,0,270
		    );
		  
		  db.addLevel(1,"1x42","plaatje",//levelpack,level,plaatje
		          //de buizen
				8,9,9,11,10,9,1,3,
				9,12,11,11,11,14,14,9,
				10,9,11,11,14,14,12,11,
				11,9,11,14,14,12,11,10,
				10,9,12,13,12,11,12,9,
				11,9,11,13,11,11,12,9,
				11,12,14,14,9,9,12,11,
				9,14,6,14,11,9,10,10,
				1,2,5,2,2,14,12,9,
				4,1,2,2,2,1,9,7,

		          //rotate van buizen: 0, 90, 180, 270
				0,90,0,0,90,180,90,90,180,
				90,90,270,180,270,90,90,180,180,
				0,0,180,90,0,180,270,180,270,
				90,0,180,180,270,270,180,90,180,
				270,180,0,0,180,0,270,180,270,
				270,270,270,0,180,180,0,270,90,
				90,270,180,90,90,180,0,180,90,
				0,270,180,0,0,270,180,180,270,
				0,180,180,90,180,270,270,90
		    );
		  db.addLevel(1,"1x43","plaatje",//levelpack,level,plaatje
		          //de buizen
				  8,11,11,10,10,9,1,1,
				  9,11,11,4,9,11,2,2,
				  10,1,13,2,13,13,6,1,
				  10,1,13,2,14,11,14,1,
				  11,11,11,4,2,3,10,4,
				  10,9,14,2,14,11,14,1,
				  10,1,2,2,13,13,2,2,
				  9,14,2,1,9,11,9,5,
				  9,12,11,11,10,10,14,2,
				  9,9,7,8,4,5,2,1,
		          //rotate van buizen: 0, 90, 180, 270
				  270,180,0,180,180,90,180,270,180,
				  90,270,180,180,90,90,0,180,90,
				  0,0,270,180,180,180,270,0,90,
				  270,90,270,180,90,270,270,180,180,
				  90,180,270,270,270,0,90,270,90,
				  180,0,270,0,180,270,180,0,270,
				  0,90,270,0,0,90,180,0,180,
				  180,90,90,180,90,90,180,90,270,
				  180,270,90,270,90,270,90,180
				    );
		  db.addLevel(1,"1x44","plaatje",//levelpack,level,plaatje
		          //de buizen
				  1,5,2,5,5,5,5,1,
				  3,8,13,11,11,11,9,5,
				  1,5,1,11,14,13,13,2,
				  5,8,1,13,14,12,11,5,
				  2,13,2,11,12,14,13,2,
				  5,10,2,13,13,2,10,5,
				  5,11,13,12,12,13,11,5,
				  2,13,2,14,11,2,13,1,
				  5,9,10,13,9,5,7,4,
				  1,5,5,2,5,2,5,1,
		          //rotate van buizen: 0, 90, 180, 270
				  0,270,180,0,90,180,0,0,180,
				  180,90,180,180,0,180,180,270,180,
				  180,270,0,0,90,90,180,270,0,
				  90,90,0,180,180,180,90,0,90,
				  0,0,180,270,180,90,180,270,90,
				  270,270,0,0,270,0,90,180,180,
				  0,180,0,180,270,0,180,270,270,
				  180,90,180,180,0,90,270,90,180,
				  180,0,90,0,90,90,90,90
			    );
		  
		  db.addLevel(1,"1x45","plaatje",//levelpack,level,plaatje
		          //de buizen
				  0,9,10,11,11,10,11,9,
				  9,12,7,11,11,8,11,9,
				  9,11,11,12,11,11,11,9,
				  9,10,11,12,11,11,10,9,
				  11,11,10,11,11,11,11,9,
				  11,11,7,11,11,8,11,11,
				  11,11,10,11,11,10,11,10,
				  9,11,11,11,9,10,11,11,
				  9,11,11,7,8,11,10,11,
				  9,10,11,10,10,11,10,9,
		          //rotate van buizen: 0, 90, 180, 270
				  270,270,0,180,90,270,270,270,180,
				  180,0,270,0,270,0,0,180,90,
				  0,0,180,270,270,180,180,270,0,
				  180,90,90,270,270,0,270,270,180,
				  0,0,180,180,90,270,270,0,180,
				  0,90,180,180,0,270,180,270,0,
				  270,270,270,0,0,90,90,90,90,
				  270,270,180,270,180,0,90,270,90,
				  90,0,270,90,180,90,90,0
		    );
		  db.addLevel(1,"1x46","plaatje",//levelpack,level,plaatje
		          //de buizen
				 1,4,1,2,5,1,3,1,
				 2,2,2,2,1,2,2,2,
				 2,1,1,2,1,2,6,1,
				 1,5,2,6,2,2,2,1,
				 3,2,2,1,1,6,2,5,
				 1,6,2,2,5,2,2,2,
				 2,2,2,2,2,2,2,2,
				 2,2,2,2,2,2,2,4,
				 2,2,2,2,5,5,6,1,
				 1,4,1,4,0,4,2,1,
				 
		          //rotate van buizen: 0, 90, 180, 270
				 0,270,0,270,90,270,90,90,270,
				 0,0,270,0,0,90,270,0,0,
				 0,0,180,270,180,90,270,180,270,
				 180,0,270,0,0,180,0,0,270,
				 0,270,180,90,90,180,270,180,90,
				 270,270,90,270,270,270,270,180,90,
				 90,90,180,90,90,90,180,0,0,
				 90,180,90,180,180,0,270,0,90,
				 180,0,0,90,0,90,180,180
		    );
		  db.addLevel(1,"1x47","plaatje",//levelpack,level,plaatje
		          //de buizen
				  4,9,10,10,11,11,11,8,
				  2,13,5,1,11,12,11,9,
				  5,11,11,13,11,14,1,10,
				  5,9,11,14,2,2,1,10,
				  4,7,11,11,2,2,3,8,
				  9,11,11,11,2,14,10,9,
				  10,11,11,14,2,14,11,11,
				  11,12,12,14,1,5,11,11,
				  11,9,9,12,14,14,11,11,
				  9,10,10,11,11,11,10,9,
		          //rotate van buizen: 0, 90, 180, 270
				  0,90,270,180,270,180,180,0,270,
				  90,90,0,180,0,270,270,270,90,
				  90,90,180,180,270,0,270,90,270,
				  0,0,270,270,270,180,270,90,90,
				  180,270,0,270,90,270,180,180,270,
				  0,180,270,180,0,180,270,180,90,
				  0,270,180,90,270,180,180,90,90,
				  0,90,0,90,270,180,270,0,180,
				  90,180,90,0,90,270,270,0
		    
		    );
		  db.addLevel(1,"1x48","plaatje",//levelpack,level,plaatje
		          //de buizen
				  9,11,11,11,11,11,11,9,
				  11,11,11,11,10,10,10,10,
				  11,11,11,12,11,11,11,10,
				  9,12,11,9,9,11,9,9,
				  1,13,3,7,4,13,5,1,
				  5,11,11,12,11,12,9,5,
				  1,13,13,13,13,13,13,1,
				  8,9,10,9,11,10,9,9,
				  9,11,11,10,11,11,11,11,
				  9,11,10,10,11,9,9,9,
		          //rotate van buizen: 0, 90, 180, 270
				  90,0,0,270,180,270,90,0,270,
				  270,270,270,0,180,90,0,270,90,
				  180,270,0,90,180,90,0,0,180,
				  270,0,0,90,0,90,0,270,90,
				  0,0,270,180,90,0,270,0,180,
				  90,180,0,270,180,270,0,90,270,
				  180,270,180,90,0,270,90,0,270,
				  270,90,180,90,0,90,180,90,180,
				  270,180,270,270,270,180,180,90
		    );
		  db.addLevel(1,"1x49","plaatje",//levelpack,level,plaatje
		          //de buizen
				  9,10,9,0,9,10,9,0,
				  9,9,11,10,12,11,11,9,
				  9,11,11,11,11,11,9,10,
				  11,9,10,7,10,10,11,9,
				  9,10,11,11,12,11,9,9,
				  0,9,11,11,11,11,9,11,
				  9,9,10,11,11,9,11,9,
				  9,9,11,11,8,10,11,0,
				  9,9,10,10,9,11,11,9,
				  9,10,9,9,9,9,10,9,
		          //rotate van buizen: 0, 90, 180, 270
				  180,270,0,90,270,270,180,90,270,
				  90,90,0,90,180,90,0,180,90,
				  90,0,0,270,90,0,270,270,180,
				  90,90,90,180,270,0,180,0,180,
				  90,0,180,180,90,90,0,90,180,
				  180,180,270,0,180,0,90,270,180,
				  270,90,180,90,270,180,270,0,180,
				  270,270,0,90,270,90,90,0,0,
				  90,0,0,90,0,180,90,180
		    );
		  db.addLevel(1,"1x50","plaatje",//levelpack,level,plaatje
		          //de buizen
				1,1,1,5,5,1,1,1,
				1,6,2,0,4,5,1,2,
				0,5,1,5,2,2,5,2,
				1,1,1,2,2,2,5,1,
				1,2,1,5,2,6,5,1,
				1,2,3,6,1,1,1,5,
				2,2,5,6,2,1,5,5,
				1,2,1,2,1,3,2,2,
				1,2,1,2,1,1,2,5,
				1,5,5,1,1,2,2,1,
		          //rotate van buizen: 0, 90, 180, 270
				0,180,0,0,0,0,270,180,180,
				90,180,90,90,180,90,90,270,270,
				180,180,0,180,0,270,0,0,180,
				180,270,0,270,0,180,90,270,270,
				90,180,90,180,90,180,0,90,180,
				0,90,0,0,180,180,270,0,0,
				180,90,180,0,90,270,180,180,270,
				0,180,270,270,90,0,0,270,90,
				180,180,90,0,0,180,90,180
		    
		    );
		  db.addLevel(1,"1x51","plaatje",//levelpack,level,plaatje
		          //de buizen
				  1,5,1,0,1,1,1,1,
				  5,1,6,1,5,1,6,2,
				  1,2,4,3,2,5,1,5,
				  1,2,1,1,5,1,5,2,
				  5,2,1,1,6,6,2,1,
				  2,1,1,1,5,2,2,1,
				  2,2,6,2,1,6,2,1,
				  1,2,5,1,2,2,5,0,
				  1,1,2,2,2,2,2,1,
				  1,5,1,1,1,1,5,1,
		          //rotate van buizen: 0, 90, 180, 270
				  180,180,90,0,90,90,270,0,180,
				  90,270,270,180,180,0,180,270,0,
				  90,90,270,270,270,180,180,180,90,
				  90,180,270,180,0,90,270,270,270,
				  270,0,0,180,270,90,180,0,90,
				  180,90,0,270,270,90,0,180,0,
				  270,0,0,0,270,180,180,0,90,
				  180,90,270,270,90,270,180,270,0,
				  90,0,270,0,90,90,270,90
		    );
		  db.addLevel(1,"1x52","plaatje",//levelpack,level,plaatje
		          //de buizen
				  1,5,2,5,5,2,5,1,
				  1,4,2,2,2,2,4,1,
				  1,2,2,2,2,2,2,1,
				  5,2,6,6,6,6,2,5,
				  1,2,2,1,1,2,2,1,
				  1,2,2,1,1,2,2,1,
				  5,2,6,6,6,6,2,5,
				  1,2,2,2,2,2,2,1,
				  1,3,2,2,2,2,3,1,
				  1,5,2,5,5,2,5,1,
		          //rotate van buizen: 0, 90, 180, 270
				  180,0,180,180,180,90,90,0,0,
				  180,270,0,0,270,180,0,90,180,
				  90,0,270,270,90,180,0,90,180,
				  90,0,270,90,270,270,0,90,0,
				  0,0,0,270,180,270,180,270,0,
				  90,270,90,270,0,270,270,90,270,
				  270,90,180,270,270,270,90,270,0,
				  0,180,270,180,270,270,270,90,180,
				  90,270,180,90,180,180,90,180
		    
		    );
	}
	private void addExtraLevelsLevelPack2(){
		db.addLevel(2,"2x41","plaatje",//levelpack,level,plaatje
				//de buizen
				16,16,16,16,16,16,16,16,
				0,1,2,1,0,1,2,1,
				0,5,3,2,5,2,4,5,
				0,1,5,1,0,1,5,1,
				0,0,0,3,0,4,0,0,
				0,0,0,1,5,1,0,0,
				4,2,2,2,2,2,2,3,
				0,2,6,6,6,6,2,0,
				0,1,2,2,2,2,1,0,
				0,0,0,0,0,0,0,0,
				//rotate van buizen: 
				180,90,270,180,180,270,0,90,180,
				270,270,90,90,0,90,270,180,270,
				90,0,90,180,90,90,0,0,0,
				0,90,180,270,0,90,90,270,180,
				90,90,270,0,270,180,90,270,0,
				180,0,180,90,90,90,0,0,180,
				270,90,180,90,90,180,90,180,90,
				270,180,90,90,180,90,180,0,270,
				180,0,0,0,0,90,0,90
				);
		db.addLevel(2,"2x42","plaatje",//levelpack,level,plaatje
				//de buizen
				1,5,5,1,0,1,5,1,
				1,5,3,1,5,1,3,5,
				1,5,5,5,5,5,1,5,
				5,1,5,5,1,1,1,5,
				5,4,3,4,5,5,5,5,
				2,1,4,3,5,5,5,5,
				5,5,4,1,5,4,5,5,
				5,1,5,1,5,1,1,5,
				5,1,5,3,5,5,1,1,
				1,2,5,5,1,1,1,0,
				//rotate van buizen: 
				180,180,270,180,0,90,0,270,180,
				90,90,270,0,180,0,180,180,180,
				0,90,180,0,0,90,90,90,0,
				0,90,270,90,0,180,0,0,90,
				270,180,0,90,0,180,270,0,0,
				270,0,0,180,270,0,0,180,180,
				270,270,270,0,90,0,90,180,0,
				180,180,180,270,270,0,180,180,270,
				270,270,270,0,90,0,90,90
				);
		db.addLevel(2,"2x43","plaatje",//levelpack,level,plaatje
				//de buizen
				1,5,5,5,2,5,1,0,
				5,0,1,5,6,5,2,1,
				2,5,2,0,2,5,5,2,
				5,0,5,3,2,2,2,1,
				5,0,5,1,5,2,5,0,
				1,2,1,5,4,2,5,0,
				0,5,1,1,1,1,2,1,
				1,2,6,5,6,5,1,5,
				1,5,2,0,4,0,0,5,
				0,0,1,5,5,5,5,1,
				//rotate van buizen: 
				270,0,180,270,180,270,270,90,270,
				90,0,0,90,90,0,180,90,0,
				90,180,0,90,180,270,270,0,90,
				0,90,0,270,270,90,270,90,0,
				270,270,0,90,180,90,180,90,90,
				0,180,270,0,90,270,270,180,270,
				180,180,270,180,180,0,90,90,90,
				0,90,180,180,0,90,270,270,0,
				180,90,180,180,90,270,180,0
				);
		db.addLevel(2,"2x44","plaatje",//levelpack,level,plaatje
				//de buizen
				1,5,5,1,1,1,0,0,
				1,5,1,1,1,5,0,0,
				3,1,1,0,1,1,1,1,
				1,1,3,5,2,5,1,5,
				1,1,1,1,0,4,1,1,
				5,1,1,1,1,2,1,0,
				1,1,1,1,1,1,1,1,
				0,1,1,5,1,1,5,4,
				1,5,5,1,5,5,5,0,
				1,5,5,5,1,1,1,0,
				//rotate van buizen: 
				0,180,270,90,270,90,180,90,270,
				0,0,270,0,0,270,90,270,0,
				270,270,0,180,0,270,90,90,90,
				270,0,180,90,0,270,180,180,270,
				0,0,0,180,0,90,90,90,180,
				180,90,270,0,270,90,90,270,270,
				180,0,90,90,180,180,270,270,270,
				270,180,270,90,180,0,0,180,270,
				180,270,180,90,0,90,270,0
				);
		db.addLevel(2,"2x45","plaatje",//levelpack,level,plaatje
				//de buizen
				3,4,3,5,5,5,5,4,
				5,5,1,1,1,1,1,1,
				5,1,1,1,1,1,1,5,
				1,1,1,1,1,1,1,1,
				0,1,1,1,1,1,1,0,
				1,5,1,3,1,5,2,3,
				5,3,5,4,5,4,5,0,
				5,5,1,5,1,5,5,0,
				5,1,5,5,5,1,5,0,
				1,5,5,5,5,5,2,4,
				//rotate van buizen: 
				90,270,90,270,90,0,180,0,0,
				90,0,270,90,270,0,0,270,180,
				270,0,270,0,270,0,0,90,0,
				270,90,180,180,180,0,90,270,0,
				270,90,0,180,0,0,270,90,270,
				270,0,90,0,270,180,270,0,0,
				90,0,270,0,0,270,90,180,180,
				90,0,180,0,90,180,90,270,0,
				180,270,0,270,90,270,90,180
				);
		db.addLevel(2,"2x46","plaatje",//levelpack,level,plaatje
				//de buizen
				1,2,5,2,5,5,5,3,
				2,2,2,2,5,2,5,1,
				2,2,2,5,2,2,2,2,
				2,2,5,2,2,2,2,2,
				2,2,5,2,2,2,5,2,
				2,2,2,5,2,5,5,2,
				2,5,2,5,2,5,2,2,
				2,5,2,5,2,2,2,2,
				2,2,2,5,2,2,2,1,
				1,2,5,5,2,5,2,4,
				//rotate van buizen: 
				0,0,90,0,180,270,90,180,90,
				90,90,0,180,180,90,270,0,270,
				270,270,180,90,0,180,0,90,180,
				180,0,0,90,90,0,180,0,0,
				270,90,270,270,270,90,90,180,180,
				0,90,270,0,90,270,90,90,270,
				180,90,90,90,180,90,180,90,180,
				270,270,0,90,0,0,180,180,0,
				270,90,180,270,270,90,270,270
				);
		db.addLevel(2,"2x47","plaatje",//levelpack,level,plaatje
				//de buizen
				9,8,9,10,9,4,5, 
				1,9,10,9,1,13,5,1, 
				5,0,9,9,3,10,7,14, 
				1,16,10,9,8,10,4,8, 
				15,0,11,10,7,10,1,5, 
				1,9,9,1,5,13,5,5, 
				1,10,4,1,3,10,0,16, 
				0,10,1,5,5,13,5,5, 
				1,9,9,15,7,10,3,0, 
				5,8,9,0,9,9,1,5, 1,

				//rotate van buizen: 
				90,180,0,180,0,0,180,0,90,
				0,0,270,0,0,180,270,0,180,
				0,90,270,180,180,180,0,180,270,
				0,270,0,0,180,180,0,0,180,
				0,0,270,270,270,180,90,270,0,
				270,180,0,0,0,180,90,180,270,
				90,0,180,90,180,270,270,270,180,
				90,180,270,0,90,270,180,0,270,
				90,180,180,90,270,0,180,180
				); 

				db.addLevel(2,"2x48","plaatje",//levelpack,level,plaatje
				//de buizen
				16,8,0,15,8,0,0, 
				0,8,11,11,10,11,10,9, 
				0,0,16,8,0,8,0,11, 
				8,0,9,10,10,12,10,11, 
				8,8,11,9,10,11,15,1, 
				4,16,10,10,1,13,5,1, 
				0,9,11,11,13,11,10,10, 
				7,10,7,9,14,1,1,5, 
				1,9,9,0,10,5,2,1, 
				5,15,8,0,8,1,1,3,4,

				//rotate van buizen: 
				0,270,270,0,90,270,180,90,270,
				180,0,0,180,180,270,180,270,270,
				180,0,270,270,180,180,270,0,0,
				270,270,270,90,270,180,90,270,270,
				180,0,180,270,270,0,0,270,270,
				90,270,0,0,90,270,180,0,90,
				0,180,180,270,270,0,0,270,180,
				90,270,0,180,270,270,180,180,90,
				180,0,0,270,270,90,90,0
				); 

				db.addLevel(2,"2x49","plaatje",//levelpack,level,plaatje
				//de buizen
				1,1,1,2,5,5,5, 
				1,5,2,2,5,1,2,2, 
				1,5,2,6,2,5,1,2, 
				1,5,1,2,2,2,1,1, 
				2,5,1,1,1,2,6,2, 
				5,2,2,2,4,3,2,1, 
				1,5,1,1,1,5,1,1, 
				1,1,5,1,1,1,1,2, 
				5,1,5,2,1,2,6,2, 
				2,1,5,5,2,1,1,5,1,

				//rotate van buizen: 
				0,270,270,0,90,0,0,270,180,
				270,270,0,180,0,180,0,270,270,
				270,180,90,180,0,270,180,90,90,
				0,180,0,270,90,270,90,180,90,
				0,90,0,270,270,180,270,90,0,
				0,90,90,180,180,270,180,0,0,
				90,180,270,90,270,270,0,0,0,
				0,90,90,0,0,90,270,270,0,
				270,180,180,270,180,90,270,270
				); 

				db.addLevel(2,"2x50","plaatje",//levelpack,level,plaatje
				//de buizen
				8,9,0,9,10,7,0, 
				15,9,9,9,14,1,1,1, 
				0,11,11,14,1,1,1,1, 
				4,11,14,1,0,1,1,0, 
				0,10,1,1,1,1,1,5, 
				1,10,1,1,1,1,1,5, 
				1,10,1,1,1,1,1,5, 
				1,10,1,1,1,1,1,5, 
				1,9,14,1,1,1,1,5,
				 1,8,9,1,1,0,3,5,1,

				//rotate van buizen: 
				0,270,180,270,0,180,0,180,180,
				0,180,270,90,0,270,270,0,270,
				0,180,270,180,270,90,270,180,180,
				270,0,180,0,270,0,90,0,180,
				0,270,270,270,0,270,90,180,90,
				0,90,180,0,180,0,0,180,0,
				0,90,90,180,270,90,270,180,270,
				90,0,90,180,270,270,180,180,270,
				90,270,0,180,0,90,180,270
				); 

				db.addLevel(2,"2x51","plaatje",//levelpack,level,plaatje
				//de buizen
				7,1,1,1,1,1,1,7,
				10,5,5,5,1,1,5,10, 
				10,5,3,1,1,3,14,9, 
				11,14,5,4,4,9,11,9, 
				10,9,10,8,8,9,8,11, 
				9,11,10,8,8,10,11,9, 
				9,14,1,4,4,1,13,1, 
				10,5,3,5,5,3,10,5, 
				10,1,1,5,5,1,13,1, 
				7,0,1,1,1,1,9,7,

				//rotate van buizen: 
				180,180,180,0,180,90,180,0,270,
				0,180,270,0,180,180,180,270,180,
				90,0,0,270,90,270,0,180,270,
				90,90,90,180,90,270,90,270,180,
				270,180,90,0,180,270,0,0,0,
				180,270,270,0,180,0,90,0,180,
				90,90,270,180,270,90,90,180,90,
				90,0,90,0,90,270,90,180,180,
				90,0,90,270,0,270,0,180
				); 


				db.addLevel(2,"2x52","plaatje",//levelpack,level,plaatje
				//de buizen
				1,4,4,1,1,4,1, 
				4,1,1,1,1,1,3,1, 
				1,1,1,1,1,4,1,1, 
				3,1,1,1,1,1,1,1, 
				1,1,1,3,1,1,3,5, 
				1,3,1,1,4,1,1,1, 
				1,1,1,4,1,1,1,1, 
				3,1,1,1,1,1,1,4, 
				1,1,1,1,1,1,1,3, 
				5,1,3,4,1,1,3,1,1,

				//rotate van buizen: 
				0,0,90,270,270,180,180,270,0,
				0,90,180,90,0,270,180,90,90,
				180,90,270,180,90,90,270,180,0,
				90,90,180,180,0,270,270,90,270,
				90,270,0,180,90,270,180,180,270,
				90,270,90,0,0,0,0,90,90,
				0,180,270,180,270,0,180,270,90,
				180,90,0,90,90,180,270,90,90,
				90,0,270,270,0,180,270,180
				); 
	}
	
	private void addExtraLevelsLevelPack3(){
		db.addLevel(3,"3x41","plaatje",//levelpack,level,plaatje
				//de buizen
				0,0,1,1,1,1,1,1,
				0,1,1,1,1,1,1,3,
				4,1,2,2,1,3,2,4,
				1,5,1,5,1,1,1,1,
				1,5,4,5,3,1,1,5,
				1,1,1,1,1,5,2,1,
				1,2,2,1,4,5,2,1,
				2,3,0,1,1,4,1,5,
				1,1,1,1,1,2,1,5,
				4,2,1,1,4,1,2,1,
				//rotate van buizen: 
				0,0,180,0,180,0,90,270,180,
				180,90,180,90,90,0,270,270,0,
				0,90,180,270,180,180,270,90,90,
				0,90,90,270,180,270,0,0,270,
				0,180,0,0,270,180,0,0,270,
				180,180,90,180,90,0,180,0,180,
				270,90,270,180,180,90,180,270,180,
				270,90,90,180,270,90,270,270,180,
				180,0,270,0,0,0,0,90	
				);
						    
						    
				db.addLevel(3,"3x42","plaatje",//levelpack,level,plaatje
				//de buizen
				4,1,2,1,4,2,2,4,
				2,2,3,1,1,4,1,1,
				5,4,1,4,1,1,1,2,
				1,4,2,1,1,1,1,2,
				1,2,1,1,2,0,1,2,
				5,1,2,2,2,2,1,5,
				4,3,2,6,2,2,1,5,
				1,1,2,2,1,1,1,3,
				5,1,1,1,1,1,5,1,
				1,2,5,1,1,5,5,1,
				//rotate van buizen: 
				180,0,180,0,90,180,180,270,270,
				0,180,90,90,0,180,180,180,270,
				0,0,0,0,270,180,0,0,0,
				270,90,180,270,270,180,180,90,270,
				180,90,90,0,90,90,180,180,270,
				270,90,270,180,270,90,270,270,90,
				90,270,270,270,270,90,0,270,90,
				0,270,90,90,270,180,270,270,0,
				90,180,270,270,270,180,180,270
				);
						  

				db.addLevel(3,"3x43","plaatje",//levelpack,level,plaatje
				//de buizen
				1,1,3,5,1,1,1,4,
				5,1,2,1,1,1,1,2,
				1,1,3,1,1,3,2,1,
				1,1,4,0,1,1,1,1,
				1,1,1,1,0,1,1,4,
				3,1,4,1,1,0,1,1,
				1,1,4,1,1,1,1,1,
				4,1,1,5,1,1,1,1,
				1,1,1,2,1,1,1,1,
				4,2,5,2,4,1,1,0,
				//rotate van buizen: 
				0,270,0,90,270,180,180,90,90,
				0,90,90,90,270,90,90,0,90,
				0,180,180,270,90,180,270,0,90,
				90,90,90,0,0,90,0,270,270,
				90,270,180,90,0,0,90,90,0,
				90,90,0,90,0,180,0,90,180,
				0,90,180,180,0,90,90,0,270,
				270,270,90,0,90,0,0,0,0,
				90,0,270,90,0,180,180,270
				);
						

				db.addLevel(3,"3x44","plaatje",//levelpack,level,plaatje
				//de buizen
				1,3,1,4,3,1,1,3,
				4,1,1,1,1,4,1,1,
				1,1,3,1,1,1,1,1,
				1,1,1,1,1,1,1,4,
				3,1,1,1,1,3,3,1,
				1,4,3,4,4,1,4,1,
				1,4,3,4,4,1,3,1,
				3,3,1,1,1,3,3,4,
				1,5,2,1,4,1,2,1,
				1,4,3,5,4,4,4,1,
				//rotate van buizen: 
				90,90,0,90,180,270,90,0,90,
				270,90,180,0,180,180,270,270,270,
				270,270,270,180,180,0,0,270,90,
				270,0,90,270,0,180,180,90,90,
				90,0,0,90,0,270,0,0,270,
				0,0,270,90,90,270,180,180,0,
				270,90,0,0,180,0,0,0,270,
				90,0,90,0,0,90,0,0,180,
				90,90,0,90,270,0,270,0
				);
				   
				 
				db.addLevel(3,"3x45","plaatje",//levelpack,level,plaatje
				//de buizen
				1,1,4,2,2,4,0,3,
				5,1,2,2,1,1,1,1,
				1,1,3,5,1,1,1,1,
				1,2,1,4,1,1,1,1,
				1,1,1,1,0,1,1,0,
				1,1,1,1,1,1,0,0,
				1,1,1,1,3,1,1,0,
				4,1,1,1,1,0,1,1,
				1,1,1,1,1,1,1,1,
				0,1,3,1,4,3,4,0,
				//rotate van buizen: 
				90,270,90,270,270,270,180,0,270,
				0,270,0,180,0,0,90,180,0,
				90,270,270,270,180,0,90,180,0,
				180,180,0,0,270,270,180,90,180,
				180,90,270,90,270,90,90,90,90,
				180,90,180,0,0,0,180,270,270,
				180,0,90,90,90,270,270,0,270,
				270,180,270,180,90,270,270,180,90,
				0,180,0,180,180,90,270,180
				);  
				   
				   
				db.addLevel(3,"3x46","plaatje",//levelpack,level,plaatje
				//de buizen
				1,2,4,1,4,0,4,1,
				5,1,1,1,1,1,5,2,
				1,1,1,3,3,1,1,5,
				1,2,5,3,3,1,1,5,
				1,1,4,1,2,1,1,1,
				1,2,1,1,1,4,2,1,
				1,1,1,4,4,1,1,1,
				1,1,4,1,1,2,2,1,
				1,2,4,2,2,1,3,1,
				4,2,4,4,4,2,5,4,
				//rotate van buizen: 
				270,270,270,90,90,270,0,270,180,
				90,180,0,270,180,180,180,180,0,
				270,90,180,0,90,180,180,270,90,
				90,90,0,90,180,0,270,180,180,
				90,90,270,90,90,90,180,0,0,
				270,90,180,270,0,0,0,180,270,
				270,0,0,0,180,0,90,180,90,
				90,90,0,0,0,90,90,270,180,
				0,180,90,90,0,90,270,0	
				); 
				db.addLevel(3,"3x47","plaatje",//levelpack,level,plaatje
						//de buizen
						1,2,1,1,5,5,5,1,
						2,1,5,1,1,0,1,1,
						1,1,5,0,1,1,1,1,
						1,1,1,1,0,5,1,1,
						5,1,1,1,1,4,1,1,
						1,1,1,1,5,1,1,5,
						1,5,1,5,1,1,1,1,
						1,1,1,1,3,5,5,1,
						1,1,1,1,1,1,1,1,
						1,5,1,1,1,1,1,0,
						//rotate van buizen: 
						270,180,0,90,180,0,0,270,270,
						180,270,0,0,90,90,180,90,180,
						180,0,90,180,180,270,180,90,0,
						0,270,90,90,270,270,90,0,0,
						180,180,90,270,90,180,0,90,0,
						90,90,0,90,270,0,90,0,90,
						0,270,270,180,270,0,180,180,180,
						0,270,180,270,270,0,90,90,90,
						180,270,0,90,180,270,0,270
						); 

						db.addLevel(3,"3x48","plaatje",//levelpack,level,plaatje
						//de buizen
						1,1,3,1,1,4,3,1,
						5,3,1,1,1,1,1,1,
						1,4,1,1,1,1,1,1,
						3,1,1,1,1,4,1,1,
						1,1,1,1,4,1,1,3,
						1,5,3,1,1,3,1,1,
						1,1,1,1,1,1,1,1,
						3,1,1,4,1,1,1,1,
						1,1,3,1,1,1,1,1,
						4,1,4,1,1,4,4,1,
						//rotate van buizen: 
						180,270,180,90,90,0,270,90,90,
						270,270,270,180,0,0,0,270,0,
						0,180,0,90,270,270,270,90,90,
						270,180,180,270,90,90,90,90,180,
						180,180,0,0,180,0,270,270,270,
						270,0,270,270,0,180,270,90,180,
						180,180,90,0,90,180,270,270,180,
						270,90,270,180,270,0,0,180,180,
						90,90,90,180,180,180,90,90
						); 


						db.addLevel(3,"3x49","plaatje",//levelpack,level,plaatje
						//de buizen
						1,5,3,1,1,4,1,3,
						1,5,5,1,5,1,1,5,
						3,1,1,2,2,1,1,1,
						1,1,4,1,5,5,1,4,
						1,5,5,5,5,5,5,1,
						1,4,1,4,1,4,1,3,
						1,1,1,1,1,1,1,1,
						3,1,1,1,1,2,5,1,
						1,1,1,1,1,2,1,1,
						4,2,4,1,5,2,1,4,
						//rotate van buizen: 
						180,0,270,270,90,180,180,0,270,
						90,0,270,180,0,0,180,90,0,
						0,0,90,90,270,90,270,180,180,
						270,90,0,90,90,90,180,90,180,
						180,0,90,0,0,90,270,270,270,
						270,180,180,90,0,0,270,180,90,
						0,90,90,90,0,270,270,0,90,
						90,90,270,0,0,0,90,90,0,
						270,90,270,270,90,90,180,180	
						); 


						db.addLevel(3,"3x50","plaatje",//levelpack,level,plaatje
						//de buizen
						0,1,5,5,5,2,5,1,
						1,1,1,2,1,1,2,1,
						5,1,1,5,1,1,1,1,
						5,1,1,5,1,1,1,1,
						5,1,1,5,1,1,1,1,
						1,1,3,5,0,1,1,5,
						4,1,1,5,0,1,1,5,
						2,1,4,3,4,2,1,5,
						1,1,2,1,1,1,1,1,
						4,2,1,1,1,1,4,0,
						//rotate van buizen: 
						270,270,0,180,90,0,270,180,180,
						90,180,270,90,0,270,270,0,270,
						90,0,90,90,90,180,0,180,270,
						0,0,180,90,0,180,0,0,180,
						180,90,0,0,270,0,270,90,180,
						180,0,0,0,180,270,0,180,0,
						90,270,270,0,270,90,180,90,0,
						90,270,0,90,90,90,180,270,90,
						270,0,180,180,90,270,90,90
						); 


						db.addLevel(3,"3x51","plaatje",//levelpack,level,plaatje
						//de buizen
						0,1,1,0,1,1,0,0,
						1,1,4,1,1,1,2,1,
						1,1,3,2,3,1,4,5,
						1,1,0,4,0,1,5,1,
						3,3,1,1,1,0,0,0,
						1,4,1,2,1,1,0,0,
						1,1,1,2,1,5,1,1,
						3,1,1,1,1,1,2,1,
						1,1,4,1,1,0,4,1,
						0,1,1,0,1,5,5,1,
						//rotate van buizen: 
						90,0,180,90,0,180,270,0,180,
						180,0,0,270,0,0,180,0,0,
						90,0,0,90,180,180,270,270,0,
						90,180,270,270,180,0,0,0,270,
						180,270,180,180,0,90,0,270,0,
						90,270,90,90,180,180,90,180,270,
						0,0,180,0,180,0,90,180,0,
						90,90,0,270,0,0,180,270,90,
						270,0,0,180,270,180,270,270
						); 

						db.addLevel(3,"3x52","plaatje",//levelpack,level,plaatje
						//de buizen
						1,2,2,2,3,4,3,0,
						2,2,6,1,1,1,1,1,
						2,5,1,1,1,0,3,5,
						5,1,1,2,1,1,1,5,
						5,4,2,2,1,1,1,1,
						5,4,1,1,1,1,1,4,
						2,4,1,1,1,2,5,2,
						5,4,1,5,1,1,1,1,
						2,1,4,1,1,1,1,4,
						1,2,2,5,5,5,5,1,
						//rotate van buizen: 
						90,270,0,180,270,0,90,0,0,
						180,270,180,0,0,0,0,180,180,
						180,90,180,90,90,90,270,270,180,
						0,0,90,0,270,0,180,0,90,
						0,0,270,0,180,0,0,180,180,
						0,90,0,270,270,90,0,90,180,
						90,0,180,270,180,0,270,270,270,
						270,180,90,180,270,270,270,180,270,
						180,180,0,180,90,0,270,0
						); 
	}
	
	private void setSettingsLevelExtraLevels(){
		SharedPreferences settings = getSharedPreferences("levelsInDB", Context.MODE_PRIVATE);
    	Editor editor = settings.edit();
    	editor.putBoolean("extraLevels", true);
    	editor.commit();
	}
	
}
